:root { --ink: #151612; --paper: #f1efe8; --line: #cbc8bd; --acid: #d9ff43; --muted: #6f7169; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
main { min-height: 100vh; }
.topbar { height: 78px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: .05em; }
.brandMark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--acid); border-radius: 50%; font-family: Georgia, serif; font-style: italic; }
.privacy { display: flex; align-items: center; gap: 9px; color: #4d5147; font-size: 13px; white-space: nowrap; }
.privacyDot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #75a400; box-shadow: 0 0 0 4px #dbe7b6; }
.privacyNarrow { display: none; }
.brandText { display: flex; flex-direction: column; gap: 2px; }
.brandText strong { font-size: inherit; line-height: 1.1; }
.brandText small { color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.hero { padding: 82px 5vw 62px; display: grid; grid-template-columns: 1fr minmax(260px, 420px); column-gap: 6vw; align-items: end; }
.toolBreadcrumb { grid-column: 1 / -1; margin-bottom: 30px; display: flex; align-items: center; gap: 14px; color: var(--muted); font: 700 10px ui-monospace, monospace; letter-spacing: .08em; }
.toolBreadcrumb a { padding: 8px 11px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; background: #e8e6de; }
.toolBreadcrumb a:visited { color: var(--ink); }
.toolBreadcrumb a:hover { background: var(--ink); color: var(--acid); border-color: var(--ink); }
.toolBreadcrumb span::before { content: "/"; margin-right: 14px; color: #a2a49b; }
.eyebrow { grid-column: 1 / -1; margin: 0 0 22px; font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .22em; }
.hero h1 { margin: 0; font-size: clamp(48px, 6.6vw, 104px); line-height: .92; letter-spacing: -.065em; font-weight: 800; }
.hero h1 em { color: #72766b; font-family: Georgia, "Songti SC", serif; font-weight: 400; }
.intro { margin: 0 0 8px; font-size: 17px; line-height: 1.8; color: #5c5e57; }
.workspace { margin: 0 5vw 86px; display: grid; grid-template-columns: minmax(300px, .85fr) minmax(520px, 1.15fr); background: #fff; border: 1px solid var(--line); box-shadow: 0 22px 60px rgb(45 46 39 / 9%); }
.previewPanel { min-height: 670px; background: #1a1b18; padding: 28px; position: relative; }
.dropzone { height: 100%; min-height: 614px; border: 1px dashed #6c6e66; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #f3f1e9; transition: .2s ease; }
.dropzone.dragging { border-color: var(--acid); background: #23251d; transform: scale(.99); }
.dropzone h2 { margin: 28px 0 8px; font-size: 25px; }
.dropzone p { margin: 0; color: #9a9c94; font-size: 14px; }
.aperture { width: 74px; height: 74px; border: 1px solid #777a70; border-radius: 50%; padding: 12px; }
.aperture span { display: block; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(from 15deg, #d9ff43 0 10%, #3d4038 10% 23%, #d9ff43 23% 33%, #3d4038 33% 46%, #d9ff43 46% 56%, #3d4038 56% 69%, #d9ff43 69% 79%, #3d4038 79% 92%, #d9ff43 92%); box-shadow: inset 0 0 0 16px #1a1b18; }
.chooseButton { margin: 30px 0 18px; padding: 13px 26px; border: 0; background: var(--acid); font-weight: 800; cursor: pointer; }
.dropzone .formats { font: 10px ui-monospace, monospace; letter-spacing: .14em; }
.imageStage { height: 100%; min-height: 614px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.imageStage img { max-width: 100%; max-height: 520px; object-fit: contain; box-shadow: 0 12px 40px #0008; }
.imageMeta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 12px 14px; background: #0c0d0bdd; color: #ddd; font: 11px ui-monospace, monospace; }
.replaceButton { position: absolute; top: 0; right: 0; border: 1px solid #777; background: #111b; color: #fff; padding: 9px 14px; cursor: pointer; }
.controls { display: flex; flex-direction: column; }
.controls.disabled { opacity: .44; pointer-events: none; }
.channel { display: grid; grid-template-columns: 66px 1fr; border-bottom: 1px solid var(--line); padding: 31px 34px 31px 0; }
.channelNumber { font: 700 11px ui-monospace, monospace; text-align: center; padding-top: 4px; color: #8a8c83; }
.channelHeading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.channelHeading h2 { margin: 0 0 5px; font-size: 20px; }
.channelHeading p { margin: 0; color: var(--muted); font-size: 12px; }
.channelHeading strong { font: 700 19px ui-monospace, monospace; white-space: nowrap; }
.channelHeading small { font-size: 10px; margin-left: 4px; color: var(--muted); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; border: 1px solid var(--line); }
.segmented button { padding: 10px; border: 0; border-right: 1px solid var(--line); background: transparent; font-size: 12px; cursor: pointer; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: #fff; }
.fieldRow { display: grid; grid-template-columns: 1fr 98px; gap: 20px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--ink); cursor: pointer; }
.numberField, .targetField { display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.numberField input, .targetField input { width: 100%; border: 0; outline: 0; background: transparent; text-align: right; font: 700 17px ui-monospace, monospace; padding: 7px 3px; }
.numberField span, .targetField b { font: 11px ui-monospace, monospace; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch span { display: block; width: 42px; height: 23px; border-radius: 20px; background: #c3c4bd; padding: 3px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(19px); background: var(--acid); }
.targetRow { display: grid; grid-template-columns: minmax(170px, 1fr) auto; align-items: end; gap: 18px; }
.targetField { gap: 10px; }
.targetField > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.presetRow { display: flex; gap: 5px; }
.presetRow button { border: 1px solid var(--line); background: transparent; padding: 7px 8px; font: 10px ui-monospace, monospace; cursor: pointer; }
.qualityScale { display: flex; justify-content: space-between; color: #8a8c83; font-size: 10px; }
.qualityRange { margin-top: 12px; }
.outputBar { margin-top: auto; min-height: 112px; display: grid; grid-template-columns: 1fr auto minmax(210px, .9fr); align-items: stretch; background: var(--ink); color: #fff; }
.estimate { padding: 23px 26px; display: flex; flex-direction: column; justify-content: center; }
.estimate span { font-size: 10px; color: #a9aba3; letter-spacing: .08em; }
.estimate strong { margin-top: 5px; font: 700 30px ui-monospace, monospace; }
.formatSelect { padding: 24px 18px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #40413c; }
.formatSelect span { font-size: 9px; color: #a9aba3; }
.formatSelect select { margin-top: 7px; color: #fff; background: transparent; border: 0; outline: 0; font: 700 12px ui-monospace, monospace; }
.downloadButton { border: 0; background: var(--acid); color: var(--ink); padding: 0 22px; display: flex; align-items: center; justify-content: space-between; font-weight: 800; cursor: pointer; }
.downloadButton b { font-size: 25px; }
.downloadButton:disabled { filter: grayscale(1); opacity: .45; cursor: wait; }
.error { margin: 0; padding: 10px 18px; background: #ffe3de; color: #8d2412; font-size: 12px; }
.notes { margin: 0 5vw 82px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.notes > div { padding: 28px 5vw 0 0; border-right: 1px solid var(--line); }
.notes > div + div { padding-left: 3vw; }
.notes > div:last-child { border-right: 0; }
.notes span { font: 10px ui-monospace, monospace; color: #8a8c83; }
.notes h3 { font-size: 15px; margin: 18px 0 8px; }
.notes p { max-width: 310px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.siteFooter { padding: 36px 5vw 38px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); align-items: start; gap: 48px; color: #696c64; font: 12px/1.6 ui-monospace, monospace; letter-spacing: .02em; }
.footerBrand { display: flex; flex-direction: column; gap: 7px; }
.footerBrand strong { color: var(--ink); font-size: 14px; line-height: 1.35; letter-spacing: .01em; }
.footerLinks { display: grid; grid-template-columns: repeat(3, max-content); justify-content: end; gap: 12px 30px; }
.footerLinks a, .footerLinks a:visited { color: var(--ink); text-decoration: none; border-bottom: 1px solid #9a9c94; padding-bottom: 3px; white-space: nowrap; }
.footerLinks a:hover { border-color: var(--ink); }
.visuallyHidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #89a900; outline-offset: 3px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; row-gap: 30px; }
  .workspace { grid-template-columns: 1fr; }
  .previewPanel { min-height: 500px; }
  .dropzone, .imageStage { min-height: 444px; }
  .siteFooter { grid-template-columns: 1fr; gap: 26px; }
  .footerLinks { justify-content: start; }
}
@media (max-width: 620px) {
  .topbar { height: 66px; }
  .toolTopbar { min-height: 70px; height: auto; padding: 10px 16px; gap: 12px; }
  .toolTopbar .brand { min-width: 0; gap: 9px; font-size: 15px; letter-spacing: .02em; }
  .toolTopbar .brandMark { width: 30px; height: 30px; flex: 0 0 30px; }
  .toolTopbar .privacy { min-width: 0; margin-left: auto; gap: 7px; padding: 8px 10px; background: #e4ead0; border-radius: 999px; font-size: 10px; line-height: 1; white-space: nowrap; }
  .privacyWide { display: none; }
  .privacyNarrow { display: inline; }
  .toolBreadcrumb { margin-bottom: 22px; gap: 8px; font-size: 9px; }
  .toolBreadcrumb a { padding: 7px 9px; }
  .toolBreadcrumb span::before { margin-right: 8px; }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: 47px; }
  .workspace { margin-left: 16px; margin-right: 16px; }
  .previewPanel { min-height: 390px; padding: 16px; }
  .dropzone, .imageStage { min-height: 356px; }
  .channel { grid-template-columns: 42px 1fr; padding-right: 18px; }
  .channelHeading { flex-wrap: wrap; }
  .targetRow { grid-template-columns: 1fr; }
  .outputBar { grid-template-columns: 1fr auto; }
  .downloadButton { grid-column: 1 / -1; min-height: 66px; }
  .notes { grid-template-columns: 1fr; }
  .notes > div, .notes > div + div { padding: 25px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .siteFooter { padding: 30px 20px 34px; gap: 24px; }
  .footerLinks { grid-template-columns: 1fr; gap: 13px; }
  .footerLinks a { white-space: normal; overflow-wrap: anywhere; }
}
