:root {
  color-scheme: light;
  --paper: #f8f8f0;
  --white: #fffefa;
  --ink: #17251c;
  --muted: #526153;
  --green: #215b43;
  --deep: #143a2b;
  --line: #dce2d4;
  --wash: #eef3e8;
  --lime: #e2edcc;
  --focus: #2f7758;
  --accent: #548063;
  --line-strong: #a5baa2;
  --error: #853725;
  --shade: #2534230c;
  --tag: #102a22e6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: .25em; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; top: .7rem; left: .7rem; padding: .7rem; color: var(--ink); background: var(--white); }
.shell { max-width: 1100px; width: calc(100% - 64px); margin-inline: auto; min-inline-size: 0; }
.masthead { border-bottom: 1px solid var(--line); background: var(--white); }
.masthead-inner, .footer-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 780; line-height: 1; letter-spacing: -.05em; font-size: 1.22rem; text-decoration: none; white-space: nowrap; }
.brand .gf-site-icon { width: 30px; height: 30px; border-radius: 8px; }
.brand-accent { color: var(--green); }
nav { display: flex; align-items: center; gap: clamp(15px, 3vw, 28px); }
nav a { text-decoration: none; font-size: .87rem; font-weight: 650; color: var(--muted); }
nav a:hover { color: var(--green); text-decoration: underline; }
.hero { text-align: center; padding-block: 41px 29px; }
.hero h1 { font-size: clamp(2.85rem, 7vw, 5.05rem); font-weight: 780; letter-spacing: -.057em; line-height: .99; margin: 0 0 15px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: clamp(.95rem, 2vw, 1.12rem); line-height: 1.46; color: var(--muted); margin: 0; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.44fr) minmax(0, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: 25px; overflow: hidden; box-shadow: 0 16px 36px var(--shade), 0 2px 8px var(--shade); }
.work-panel, .preview-panel { min-inline-size: 0; padding: clamp(17px, 2.5vw, 28px); }
.preview-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--wash); }
.dropzone { width: 100%; min-height: 151px; border: 1px dashed var(--line-strong); border-radius: 15px; background: var(--wash); color: var(--deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 13px 9px; transition: border-color .16s, background .16s; }
.dropzone:hover, .dropzone.is-over { background: var(--lime); border-color: var(--green); }
.dropzone[disabled] { opacity: .65; }
.drop-icon { font-family: system-ui, sans-serif; display: grid; place-items: center; font-size: 23px; font-weight: 500; line-height: 1; width: 36px; height: 36px; border-radius: 11px; margin-bottom: 4px; color: var(--green); background: var(--lime); }
.dropzone strong { font-size: 1.08rem; font-weight: 800; }
.drop-description { color: var(--muted); font-size: .86rem; }
.format-line { margin-top: 4px; color: var(--muted); font-size: .73rem; }
.controls { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.modes { display: flex; margin: 17px 0 12px; gap: 4px; border: 1px solid var(--line); padding: 3px; border-radius: 11px; background: var(--wash); }
.modes button { flex: 1; min-width: 0; padding: 7px 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .87rem; font-weight: 730; }
.modes button[aria-pressed="true"] { background: var(--white); border-color: var(--line); color: var(--green); box-shadow: 0 1px 2px var(--shade); }
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 11px; }
.presets button { min-width: 0; border-radius: 8px; min-height: 39px; padding: 5px 2px; font-size: .83rem; font-weight: 720; border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.presets button:hover, .presets button[aria-pressed="true"] { background: var(--lime); border-color: var(--line-strong); color: var(--deep); }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-inline-size: 0; }
.field { display: grid; align-content: start; gap: 4px; min-width: 0; font-weight: 710; font-size: .78rem; }
.field > span:first-child { display: flex; justify-content: space-between; gap: 4px; }
.field :is(select, input[type=number]) { min-width: 0; max-width: 100%; width: 100%; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-height: 41px; font-size: .9rem; }
.value-unit { display: grid; grid-template-columns: minmax(0, 1fr) 62px; gap: 4px; min-width: 0; }
.value-unit select { padding-inline: 5px; }
input[type=range], input[type=checkbox] { accent-color: var(--green); }
.quality-grid input[type=range] { min-height: 38px; width: 100%; margin: 0; }
.quality-grid output { color: var(--green); font-variant-numeric: tabular-nums; }
.resize-choice { display: flex; gap: 7px; align-items: center; min-height: 36px; margin-top: 4px; color: var(--muted); font-weight: 550; font-size: .79rem; }
.resize-choice input { width: 15px; height: 15px; margin: 0; }
.work-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 12px; min-height: 43px; font-size: .86rem; font-weight: 750; line-height: 1.2; text-align: center; }
.button.primary { flex: 1 1 145px; color: white; background: var(--green); }
.button.primary:hover:not(:disabled) { background: var(--deep); }
.button.primary:disabled { color: var(--muted); background: var(--wash); border-color: var(--line); }
.button.secondary { background: var(--white); color: var(--deep); border-color: var(--line-strong); }
.button.secondary:hover:not(:disabled) { background: var(--lime); border-color: var(--line-strong); }
.button.secondary:disabled { opacity: .53; }
.control-status { margin: 6px 0 0; font-size: .81rem; color: var(--muted); overflow-wrap: anywhere; }
.control-status:empty { display: none; }
.control-status.is-error { color: var(--error); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 11px; min-height: 33px; }
.preview-heading h2 { line-height: 1.1; margin: 0; font: 700 1.39rem/1.1 var(--serif); letter-spacing: -.026em; }
.preview-badge { font-size: .65rem; font-weight: 800; letter-spacing: .08em; color: var(--deep); border-radius: 5px; padding: 3px 6px; background: var(--lime); white-space: nowrap; }
.sample-view > img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 13px; background: var(--line); }
.sample-view > p { margin: 11px 0 9px; color: var(--muted); font-size: .87rem; }
.sample-view .button { width: 100%; justify-content: space-between; }
.private-note { margin-top: auto; display: flex; gap: 7px; align-items: center; padding-top: 12px; color: var(--green); font-weight: 690; font-size: .76rem; }
.private-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.queue { display: grid; padding-top: 8px; gap: 5px; max-height: 178px; overflow: auto; }
.file-row { display: flex; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.file-row.is-selected { background: var(--lime); border-color: var(--line-strong); }
.file-select { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; text-align: left; padding: 7px; border: 0; background: transparent; color: var(--ink); }
.file-select img { width: 34px; height: 29px; flex: none; object-fit: cover; border-radius: 4px; }
.file-select span { min-width: 0; }
.file-name, .file-state { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name { font-size: .78rem; font-weight: 720; }
.file-state { font-size: .71rem; color: var(--muted); }
.file-remove { min-width: 42px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.12rem; }
.file-remove:hover:not(:disabled) { background: var(--lime); color: var(--ink); }
.compare { position: relative; isolation: isolate; --split: 50%; display: grid; aspect-ratio: 3/2; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); background-image: conic-gradient(var(--line) 25%, var(--white) 0 50%, var(--line) 0 75%, var(--white) 0); background-size: 16px 16px; }
.compare img { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; }
.compare-result { clip-path: inset(0 0 0 var(--split)); }
.compare.has-result { cursor: ew-resize; touch-action: pan-y; }
.compare.has-result [data-original] { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-divider { position: absolute; z-index: 1; inset-block: 0; left: var(--split); width: 2px; background: white; translate: -50% 0; display: grid; place-items: center; }
.compare-divider span { color: var(--deep); background: var(--white); width: 26px; height: 26px; margin-left: -12px; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; box-shadow: 0 1px 4px var(--shade); }
.compare-tag { position: absolute; bottom: 7px; padding: 2px 6px; border-radius: 4px; background: var(--tag); color: white; font-size: .65rem; font-weight: 700; }
.compare-tag.before { left: 7px; }
.compare-tag.after { right: 7px; }
.compare-slider { margin: 9px 0 0; width: 100%; }
.result-info { color: var(--muted); font-size: .78rem; padding: 7px 0; overflow-wrap: anywhere; }
.result-info > strong { display: block; font-size: 1.22rem; line-height: 1.24; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.result-info .target-message { display: block; font-weight: 720; padding-top: 2px; color: var(--green); }
.result-info .target-message.is-over, .result-info .failed { color: var(--error); }
.result-download { width: 100%; justify-content: space-between; }
.guide-section { padding-top: 52px; }
.section-intro h2 { margin: 0; font: 700 clamp(1.85rem, 4vw, 2.65rem)/1.13 var(--serif); letter-spacing: -.04em; }
.section-intro p { margin: 5px 0 0; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 19px; }
.guide-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.guide-grid h3 { font-size: 1rem; line-height: 1.24; margin: 0 0 6px; }
.guide-grid p, details p { margin: 0; color: var(--muted); font-size: .88rem; }
.faq-section { padding-block: 44px 39px; }
.faq-list { margin-top: 12px; }
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; min-height: 45px; display: list-item; padding: 11px 2px; font-size: .93rem; font-weight: 710; }
details p { padding: 0 10px 12px 2px; max-width: 70ch; }
.site-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 19px; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-brand { font-size: 1rem; }
.footer-brand .gf-site-icon { width: 24px; height: 24px; }
.notice { margin: 0 auto 9px; padding: 9px; background: var(--lime); }
@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .workbench { grid-template-columns: 1fr; border-radius: 18px; }
  .preview-panel { border-left: 0; border-top: 1px solid var(--line); }
  .sample-view { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 5px 10px; align-items: center; }
  .sample-view > img { grid-row: span 2; border-radius: 8px; }
  .sample-view > p { margin: 0; font-size: .78rem; }
  .sample-view .button { min-height: 37px; padding: 5px 8px; font-size: .77rem; }
  .preview-heading { margin-bottom: 6px; }
  .private-note { padding-top: 8px; }
  .guide-section { padding-top: 37px; }
  .guide-grid { grid-template-columns: 1fr; gap: 8px; }
  .faq-section { padding-block: 32px; }
}
@media (max-width: 450px) {
  .masthead-inner { min-height: 56px; }
  .brand { font-size: 1.04rem; gap: 6px; }
  .brand .gf-site-icon { width: 26px; height: 26px; }
  nav { gap: 11px; }
  nav a { font-size: .76rem; }
  .hero { padding-block: 27px 19px; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.1rem); max-width: 12ch; margin: 0 auto 9px; letter-spacing: -.052em; }
  .hero-break { display: none; }
  .work-panel, .preview-panel { padding: 12px; }
  .dropzone { min-height: 116px; }
  .modes { margin-block: 10px 8px; }
  .presets { margin-bottom: 8px; }
  .work-actions { margin-top: 2px; }
  .value-unit { grid-template-columns: minmax(0, 1fr) 53px; }
  .field :is(select, input[type=number]) { font-size: 16px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
