:root {
  color-scheme:light;
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --ink:#1d293d;
  --muted:#738095;
  --border:#e6ebf2;
  --pale:#f3f7ff;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  background:#fff;
  font-synthesis:none;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

button,input,a {
  -webkit-tap-highlight-color:transparent;
}

button,input {
  font:inherit;
}

button,a {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:not-allowed;
}

a {
  color:inherit;
  text-decoration:none;
}

button,a,input {
  outline-offset:5px;
}

:focus-visible {
  outline:3px solid #93b4ff;
}

button {
  border:0;
}

svg {
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.icon {
  width:20px;
  height:20px;
  flex-shrink:0;
}

.svg-defs {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

[hidden] {
  display:none!important;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.site-header {
  max-width:1240px;
  margin:auto;
  height:88px;
  padding:0 44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #f0f2f6;
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-weight:750;
  font-size:21px;
  letter-spacing:.2px;
}

.brand-mark {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  color:#fff;
  background:var(--blue);
  box-shadow:0 4px 10px #2563eb20;
}

.brand-mark .icon {
  width:24px;
  height:24px;
}

.brand-en {
  margin-left:4px;
  font-size:20px;
  letter-spacing:-.7px;
}

.header-note,.privacy-link {
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
}

.header-note {
  margin-left:-43px;
}

.status-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#5689ed;
  display:inline-block;
}

.privacy-link {
  color:#55647b;
}

.privacy-link:hover {
  color:var(--blue);
}

.privacy-link .icon {
  width:16px;
  height:16px;
}

.page {
  max-width:1136px;
  margin:auto;
  padding:0 40px;
}

.hero {
  text-align:center;
  padding:48px 0 35px;
}

.eyebrow {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#5279b9;
  background:#f2f6ff;
  border:1px solid #e5edfc;
  border-radius:20px;
  padding:6px 13px;
  font-size:11px;
  letter-spacing:1px;
}

.hero h1 {
  font-size:clamp(29px,3.6vw,44px);
  font-weight:750;
  letter-spacing:-1.5px;
  line-height:1.3;
  margin:18px 0 14px;
}

.hero h1 span {
  color:var(--blue);
}

.hero>p {
  color:var(--muted);
  font-size:14px;
  letter-spacing:.5px;
  margin:0;
  line-height:1.8;
}

.hero-tags {
  display:flex;
  justify-content:center;
  gap:24px;
  margin-top:19px;
  color:#7b8797;
  font-size:11px;
}

.hero-tags span {
  display:flex;
  align-items:center;
  gap:5px;
}

.hero-tags .icon {
  width:13px;
  height:13px;
  color:#6d92c5;
}

.workspace {
  display:grid;
  grid-template-columns:1.42fr 1fr;
  gap:23px;
  align-items:stretch;
}

.panel {
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 5px 22px #1d3c6605;
}

.upload-panel,.settings-panel {
  padding:25px;
}

.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:22px;
}

.panel-heading h2 {
  font-size:15px;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  font-weight:650;
}

.step {
  font-size:10px;
  font-weight:600;
  color:#7b8ca6;
  background:#f3f5f8;
  border-radius:6px;
  padding:5px 6px;
  letter-spacing:.5px;
}

.quiet-label {
  font-size:10px;
  color:#8c97a6;
}

.drop-zone {
  min-height:318px;
  border:1.5px dashed #c8d7f1;
  border-radius:12px;
  background:linear-gradient(135deg,#f8faff,#fcfdff);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  transition:background .2s,border-color .2s,box-shadow .2s;
}

.upload-panel.is-dragging {
  border-color:var(--blue);
  box-shadow:0 0 0 3px #2563eb1a;
}

.is-dragging .drop-zone {
  background:#eaf2ff;
  border-color:var(--blue);
}

.upload-illustration {
  position:relative;
  width:95px;
  height:76px;
  margin-bottom:12px;
}

.picture-back {
  width:58px;
  height:58px;
  border-radius:13px;
  background:#e3edff;
  border:1px solid #c6d9ff;
  position:absolute;
  left:11px;
  top:2px;
  transform:rotate(-12deg);
}

.picture-front {
  width:59px;
  height:59px;
  display:grid;
  place-items:center;
  border-radius:13px;
  border:1px solid #c3d7ff;
  background:#fff;
  position:absolute;
  left:28px;
  top:10px;
  transform:rotate(7deg);
  box-shadow:0 5px 12px #2563eb0c;
  color:#6391e7;
}

.picture-front svg {
  width:33px;
  height:33px;
  stroke-width:1.4;
}

.upload-plus {
  position:absolute;
  right:0;
  bottom:1px;
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:50%;
  border:3px solid #f8faff;
  color:#fff;
  background:var(--blue);
  font-size:19px;
  line-height:1;
}

.drop-zone h3 {
  font-size:16px;
  font-weight:600;
  margin:0 0 8px;
}

.drop-zone>p {
  font-size:12px;
  color:#8895a7;
  margin:0;
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:12px 22px;
  border-radius:8px;
  font-weight:550;
  font-size:13px;
  line-height:1.5;
  transition:background .2s,box-shadow .2s,transform .2s;
}

.primary {
  background:var(--blue);
  color:#fff;
  box-shadow:0 3px 6px #2563eb14;
}

.primary:hover {
  background:var(--blue-dark);
  box-shadow:0 5px 12px #2563eb28;
  transform:translateY(-1px);
}

.primary:active {
  transform:translateY(0);
}

.primary:disabled {
  background:#dce6f8;
  color:#7b93ba;
  box-shadow:none;
  transform:none;
}

.choose-button {
  margin:19px 0 19px;
  padding:11px 24px;
}

.button .icon {
  width:17px;
  height:17px;
}

.drop-zone .file-types {
  font-size:10px;
  letter-spacing:.7px;
  color:#778aa4;
}

.drop-zone .file-limit {
  font-size:10px;
  color:#9aa5b5;
  margin-top:7px;
}

.local-note {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:11px;
  color:#8b98aa;
  margin-top:17px;
}

.local-note .icon {
  width:14px;
  height:14px;
}

.source-preview {
  height:257px;
  border-radius:12px;
  overflow:hidden;
  display:grid;
  place-items:center;
}

.checkerboard {
  background-color:#fafbfd;
  background-image:linear-gradient(45deg,#e9edf3 25%,transparent 25%),linear-gradient(-45deg,#e9edf3 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e9edf3 75%),linear-gradient(-45deg,transparent 75%,#e9edf3 75%);
  background-size:16px 16px;
  background-position:0 0,0 8px,8px -8px,-8px 0;
}

.source-preview img {
  max-width:100%;
  max-height:257px;
  object-fit:contain;
}

.source-details {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:14px;
  justify-content:space-between;
}

.source-info {
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.source-info strong {
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.source-info span {
  font-size:11px;
  color:var(--muted);
}

.text-button {
  background:none;
  color:var(--blue);
  font-size:12px;
  padding:9px 0 9px 8px;
  white-space:nowrap;
}

.text-button:hover {
  color:var(--blue-dark);
  text-decoration:underline;
}

.text-button:disabled {
  opacity:.4;
}

.replace-hint {
  font-size:10px;
  color:var(--muted);
  text-align:center;
  margin:14px 0 0;
}

fieldset {
  padding:0;
  margin:0;
  border:0;
  min-width:0;
}

.setting-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 14px;
  font-size:12px;
  font-weight:550;
}

.setting-label output {
  font-size:24px;
  letter-spacing:-.7px;
  font-weight:650;
  color:var(--blue);
  line-height:1;
}

.setting-label output span {
  font-size:13px;
  letter-spacing:0;
  margin-left:2px;
}

input[type=range] {
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  display:block;
  margin:0;
  height:6px;
  border-radius:6px;
  background:#e7edf7;
  accent-color:var(--blue);
  cursor:pointer;
}

input[type=range]::-webkit-slider-thumb {
  appearance:none;
  -webkit-appearance:none;
  width:17px;
  height:17px;
  border:3px solid #fff;
  border-radius:50%;
  background:var(--blue);
  box-shadow:0 0 0 1px #c4d5f4,0 2px 5px #2563eb33;
}

input[type=range]::-moz-range-thumb {
  width:11px;
  height:11px;
  border:3px solid #fff;
  border-radius:50%;
  background:var(--blue);
  box-shadow:0 0 0 1px #c4d5f4;
}

input[type=range]::-moz-range-progress {
  background:var(--blue);
  height:6px;
  border-radius:6px;
}

.range-labels {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:#8d98a8;
  margin-top:13px;
}

.quality-presets {
  display:grid;
  grid-template-columns:1fr 1fr 1.3fr 1fr;
  gap:8px;
  margin:17px 0 10px;
}

.quality-presets button {
  background:#fff;
  border:1px solid var(--border);
  border-radius:7px;
  padding:8px 3px;
  font-size:11px;
  color:#6a778b;
}

.quality-presets button span {
  font-size:9px;
  margin-left:2px;
}

.quality-presets button:hover {
  border-color:#99b9fa;
}

.quality-presets button[aria-pressed=true] {
  background:#eff5ff;
  color:var(--blue);
  border-color:#aac5fb;
}

.setting-help {
  font-size:10px;
  color:#8995a6;
  line-height:1.6;
  margin:0;
}

.format-heading {
  font-size:12px;
  font-weight:550;
  margin:23px 0 11px;
}

.format-options {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
}

.format-options label {
  position:relative;
  cursor:pointer;
}

.format-options input {
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
}

.format-options label>span {
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:11px 3px 10px;
  font-size:12px;
  font-weight:600;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  transition:border-color .2s,background .2s;
}

.format-options small {
  font-size:9px;
  font-weight:400;
  color:#8a97a9;
  margin-top:4px;
}

.format-options input:checked+span {
  border-color:#97b8f7;
  background:#f1f6ff;
  color:var(--blue);
  box-shadow:0 0 0 1px #2563eb08;
}

.format-options input:checked+span small {
  color:#6c91cf;
}

.format-options input:focus-visible+span {
  outline:3px solid #93b4ff;
  outline-offset:3px;
}

.format-options label:hover>span {
  border-color:#aac5fb;
}

.format-help {
  font-size:10px;
  line-height:1.7;
  color:#8a96a7;
  margin:10px 0 20px;
  min-height:34px;
}

.compress-button {
  width:100%;
  position:relative;
}

.button-arrow {
  position:absolute;
  right:16px;
}

.action-hint {
  font-size:10px;
  color:#8c98a9;
  text-align:center;
  margin:11px 0 0;
}

fieldset:disabled {
  opacity:.6;
}

.is-busy .compress-button .icon:first-child {
  border:2px solid #adc3e9;
  border-top-color:#fff;
  border-radius:50%;
  stroke:transparent;
  animation:spin .8s linear infinite;
}

.is-busy .button-arrow {
  visibility:hidden;
}

@keyframes spin {
  to {
    transform:rotate(360deg);
  }
}

.message {
  padding:14px 18px;
  border-radius:10px;
  font-size:13px;
  line-height:1.7;
  margin:18px 0 0;
  overflow-wrap:anywhere;
}

.error-message {
  color:#ae3030;
  background:#fff3f2;
  border:1px solid #ffd9d4;
}

.status-message {
  color:#476b9b;
  background:#f2f7ff;
  border:1px solid #dae7fc;
}

.result-panel {
  margin-top:24px;
  padding:25px;
  scroll-margin-top:20px;
}

.result-badge {
  font-size:11px;
  color:#16815a;
  border-radius:20px;
  background:#edf9f3;
  padding:5px 10px;
}

.comparison {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.comparison figure {
  margin:0;
  min-width:0;
}

.comparison-image {
  height:240px;
  border-radius:10px;
  overflow:hidden;
  display:grid;
  place-items:center;
}

.comparison-image img {
  max-width:100%;
  max-height:240px;
  object-fit:contain;
}

.comparison figcaption {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  padding-top:12px;
  color:var(--muted);
}

.comparison figcaption strong {
  color:var(--ink);
  font-size:14px;
}

.comparison figcaption small {
  font-size:10px;
  margin-left:6px;
  color:var(--blue);
}

.result-bottom {
  border-top:1px solid var(--border);
  margin-top:22px;
  padding-top:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.result-stats {
  display:flex;
  gap:36px;
}

.result-stats>div {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.result-stats span {
  color:var(--muted);
  font-size:10px;
}

.result-stats strong {
  font-size:19px;
  font-weight:650;
  letter-spacing:-.4px;
}

.result-stats>div:first-child strong,.result-stats>div:nth-child(2) strong {
  color:var(--blue);
}

.result-stats>div:last-child strong {
  font-size:14px;
  line-height:24px;
}

.result-note {
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
  margin:17px 0 0;
}

.result-panel.is-larger .result-note {
  background:#fff8ed;
  color:#9e6317;
  padding:12px;
  border-radius:7px;
}

.result-panel.is-larger .result-badge {
  background:#fff4df;
  color:#9e6317;
}

.result-panel.is-larger .result-stats>div:first-child strong,.result-panel.is-larger .result-stats>div:nth-child(2) strong {
  color:#af741f;
}

.benefits {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  margin:36px 0 40px;
  padding:0 10px;
}

.benefits article {
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.benefit-icon {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  background:#f3f6fb;
  border-radius:9px;
  color:#7188a7;
  flex-shrink:0;
}

.benefit-icon .icon {
  width:18px;
  height:18px;
}

.benefits h3 {
  font-size:12px;
  font-weight:550;
  margin:1px 0 7px;
}

.benefits p {
  font-size:10px;
  line-height:1.8;
  color:#8c97a7;
  margin:0;
}

footer {
  max-width:1152px;
  margin:0 auto;
  padding:23px 16px 28px;
  border-top:1px solid #edf0f5;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  color:#8c97a7;
  font-size:10px;
}

.footer-brand {
  color:#6e7d92;
  font-weight:550;
}

.footer-brand span {
  color:#99a3b1;
  font-weight:400;
  margin-left:5px;
}

footer p {
  margin:0;
  display:flex;
  gap:6px;
  align-items:center;
  line-height:1.8;
}

footer .icon {
  width:12px;
  height:12px;
}

@media(min-width:1400px) {
  .hero {
    padding-top:64px;
    padding-bottom:42px;
  }
  .site-header {
    height:96px;
  }
  .benefits {
    margin-top:40px;
    margin-bottom:48px;
  }
}

@media(max-width:850px) {
  .site-header {
    padding:0 28px;
  }
  .page {
    padding:0 24px;
  }
  .workspace {
    gap:16px;
    grid-template-columns:1.15fr 1fr;
  }
  .upload-panel,.settings-panel {
    padding:20px;
  }
  .header-note {
    display:none;
  }
  .quiet-label {
    font-size:9px;
  }
  .result-stats {
    gap:22px;
  }
  footer {
    margin:0 24px;
    flex-direction:column;
    gap:9px;
    text-align:center;
  }
  .benefits {
    gap:18px;
    padding:0;
  }
  .benefits article {
    gap:9px;
  }
}

@media(max-width:650px) {
  .site-header {
    height:74px;
    padding:0 20px;
  }
  .brand {
    font-size:19px;
  }
  .brand-en {
    font-size:18px;
  }
  .brand-mark {
    width:34px;
    height:34px;
  }
  .privacy-link {
    font-size:11px;
  }
  .page {
    padding:0 18px;
  }
  .hero {
    padding:34px 0 28px;
  }
  .hero h1 {
    font-size:30px;
    letter-spacing:-1px;
    margin-top:17px;
  }
  .hero>p {
    font-size:12px;
    letter-spacing:0;
  }
  .hero-tags {
    gap:20px;
    font-size:10px;
    margin-top:15px;
  }
  .workspace {
    grid-template-columns:1fr;
    gap:18px;
  }
  .panel {
    border-radius:14px;
  }
  .panel-heading {
    margin-bottom:20px;
  }
  .drop-zone {
    min-height:290px;
  }
  .settings-panel {
    padding:23px;
  }
  .format-help {
    min-height:0;
    margin-bottom:20px;
  }
  .quality-presets {
    gap:10px;
  }
  .quality-presets button {
    padding:10px 3px;
  }
  .setting-label {
    margin-bottom:20px;
  }
  .range-labels {
    margin-top:16px;
  }
  .benefits {
    grid-template-columns:1fr;
    margin:28px 4px;
    gap:20px;
  }
  .benefits h3 {
    font-size:12px;
  }
  .benefits p {
    font-size:11px;
  }
  .benefit-icon {
    width:36px;
    height:36px;
  }
  .benefits article {
    gap:13px;
  }
  .result-panel {
    padding:20px;
  }
  .comparison {
    gap:12px;
  }
  .comparison-image {
    height:160px;
  }
  .comparison-image img {
    max-height:160px;
  }
  .comparison figcaption {
    align-items:flex-start;
    gap:8px;
    flex-direction:column;
  }
  .result-bottom {
    flex-direction:column;
    align-items:stretch;
  }
  .result-stats {
    gap:14px;
    justify-content:space-between;
  }
  .result-stats strong {
    font-size:18px;
  }
  .result-stats>div:last-child strong {
    font-size:12px;
  }
  .result-stats span {
    font-size:9px;
  }
  footer {
    margin:0 18px;
    padding:20px 0 24px;
    font-size:9px;
  }
  .footer-brand span {
    font-size:9px;
  }
  footer p {
    align-items:flex-start;
  }
  footer .icon {
    margin-top:2px;
  }
  .source-preview,.source-preview img {
    max-height:250px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}
