:root {
  --ink: #171713;
  --paper: #f5f1e7;
  --panel: #fffdf8;
  --blue: #1e53e5;
  --lime: #c9f45a;
  --orange: #ff674d;
  --yellow: #ffd84d;
  --muted: #65665e;
  --line: #d5d0c3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
.shell { width: min(1060px, calc(100% - 36px)); margin: auto; }

header { position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--ink); background: rgba(245, 241, 231, .94); backdrop-filter: blur(12px); }
.nav { display: flex; align-items: center; justify-content: center; gap: 32px; padding: 13px 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 950; letter-spacing: -.03em; }
.mark { display: grid; width: 35px; height: 34px; place-items: center; border: 2px solid var(--ink); border-radius: 52% 48% 45% 55%; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-size: 15px; transform: rotate(-7deg); }
.navlinks { display: flex; align-items: center; gap: 20px; }
.navlinks a { text-decoration: none; font-size: 14px; font-weight: 800; }
.navlinks .pill { padding: 9px 15px; border-radius: 999px; background: var(--ink); color: #fff; }

.hero { display: flex; flex-direction: column; align-items: center; padding: 66px 0 38px; text-align: center; }
.route-stamp, .mini-label, .section-kicker { font-size: 12px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.route-stamp { display: inline-block; padding: 7px 12px; border: 2px solid var(--ink); background: var(--orange); color: #fff; transform: rotate(-1deg); }
h1 { max-width: 980px; margin: 24px auto 25px; font-size: clamp(58px, 9vw, 103px); line-height: .88; letter-spacing: -.075em; }
h1 em { position: relative; color: var(--blue); font-family: Georgia, serif; font-weight: 400; }
h1 em::after { content: ""; position: absolute; right: -2%; bottom: -8px; left: 1%; z-index: -1; height: 12px; border: 2px solid var(--ink); background: var(--lime); transform: rotate(-1deg); }
.dek { max-width: 730px; margin: 0; color: #3f403a; font-size: clamp(18px, 2vw, 23px); }
.maker-note { display: flex; align-items: center; gap: 16px; width: min(760px, 100%); margin-top: 30px; padding: 18px 22px; border: 2px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 var(--ink); text-align: left; transform: rotate(.3deg); }
.maker-note strong { display: block; margin-bottom: 3px; font-size: 17px; }
.maker-note p { margin: 0; color: var(--muted); }
.maker-badge { flex: 0 0 55px; display: grid; height: 50px; place-items: center; border: 2px solid var(--ink); border-radius: 48% 52% 43% 57%; background: var(--lime); font-family: Georgia, serif; font-style: italic; font-weight: 900; transform: rotate(-8deg); }

.privacy-banner { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 20px; padding: 17px 22px; border: 2px solid var(--ink); background: var(--lime); text-align: center; }
.privacy-banner strong { font-size: 17px; }
.privacy-banner p { margin: 2px 0 0; color: #3c442d; font-size: 14px; }
.privacy-dot { flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--blue); box-shadow: 3px 3px 0 var(--ink); }

.converter { margin-bottom: 85px; border: 2px solid var(--ink); background: var(--panel); box-shadow: 10px 10px 0 var(--ink); }
.format-picker { padding: 28px; border-bottom: 2px solid var(--ink); text-align: center; }
.format-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 790px; margin: 18px auto; }
.format-option { min-height: 105px; padding: 15px; border: 2px solid var(--ink); background: #fff; cursor: pointer; text-align: center; transition: .15s ease; }
.format-option b { display: block; margin-bottom: 3px; font-size: 27px; letter-spacing: -.04em; }
.format-option span { color: var(--muted); font-size: 13px; }
.format-option.active { background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); transform: translate(-2px, -2px); }
.optional-settings { max-width: 790px; margin: 20px auto 0; border: 2px solid var(--ink); background: #fff; text-align: left; }
.optional-settings summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; font-weight: 900; cursor: pointer; list-style: none; }
.optional-settings summary::after { content: "+"; margin-left: auto; font-size: 20px; line-height: 1; }
.optional-settings[open] summary::after { content: "−"; }
.optional-settings summary span { color: var(--muted); font-size: 13px; font-weight: 750; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px 14px; }
.settings-row > label, .settings-row fieldset { min-width: 0; margin: 0; padding: 16px; border: 2px solid var(--ink); background: #fff; font-size: 14px; font-weight: 900; }
.settings-row label { display: grid; gap: 8px; }
.settings-row input[type="range"] { width: 100%; accent-color: var(--blue); }
.settings-row legend { padding: 0 5px; }
.background-options { display: flex; justify-content: center; gap: 7px; }
.background { min-height: 36px; padding: 6px 11px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 900; }
.background.dark { background: #111; color: #fff; }
.background.cream { background: var(--paper); }
.background.active { box-shadow: 3px 3px 0 var(--blue); transform: translate(-1px, -1px); }
.format-hint { max-width: 710px; margin: 16px auto 0; color: var(--muted); font-size: 14px; }
.hidden-control { display: none !important; }

.workspace { padding: 28px; text-align: center; }
.workspace > .mini-label { margin-bottom: 18px; }
.dropzone { display: grid; min-height: 330px; place-items: center; padding: 38px; border: 2px dashed var(--ink); border-radius: 20px; background: linear-gradient(135deg, rgba(30, 83, 229, .09), rgba(255, 103, 77, .12)); cursor: pointer; text-align: center; transition: .18s ease; }
.dropzone:hover, .dropzone.drag { background: var(--lime); transform: translateY(-2px); }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { display: grid; width: 96px; height: 78px; margin: 0 auto 21px; place-items: center; border: 2px solid var(--ink); border-radius: 50% 45% 54% 46%; background: var(--blue); box-shadow: 6px 6px 0 var(--ink); color: #fff; font-size: 43px; font-weight: 950; transform: rotate(-5deg); }
.drop-icon span { transform: rotate(5deg); }
.dropzone h2 { margin: 0 0 8px; font-size: 33px; letter-spacing: -.045em; }
.dropzone p { margin: 0 0 21px; color: var(--muted); }
.dropzone .drop-note { margin: 15px 0 0; color: var(--ink); font-size: 13px; font-weight: 800; }

.btn { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; padding: 11px 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font-weight: 900; text-decoration: none; cursor: pointer; transition: .15s ease; }
.btn:hover:not(:disabled) { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.btn:disabled { opacity: .43; cursor: not-allowed; }
.btn.blue, .convert-btn { background: var(--blue); }
.btn.secondary { background: #fff; color: var(--ink); }

.results { display: none; }
.results.active { display: block; }
.results-head { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-bottom: 21px; }
.results-head h2 { margin: 0; font-size: 38px; letter-spacing: -.05em; }
.results-head p { margin: 3px 0 0; color: var(--muted); font-weight: 750; }
.head-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.file-list { display: grid; gap: 12px; }
.file-card { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 17px; align-items: center; padding: 12px; border: 2px solid var(--ink); border-radius: 15px; background: #fff; text-align: left; }
.thumb { width: 84px; height: 70px; border: 1px solid var(--line); border-radius: 9px; background: repeating-conic-gradient(#eee 0 25%,#fff 0 50%) 50% / 16px 16px; object-fit: cover; }
.file-name { overflow: hidden; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: flex; flex-wrap: wrap; gap: 3px 13px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.conversion { color: #2f6817; font-weight: 900; }
.status { margin-top: 2px; color: var(--blue); font-size: 13px; font-weight: 850; }
.file-actions { display: flex; gap: 7px; }
.icon-btn { width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 950; cursor: pointer; }
.icon-btn:hover { background: var(--lime); }
.convert-bar { margin-top: 21px; padding: 22px; border: 2px solid var(--ink); background: #ece9df; }
.convert-bar .btn { margin: 4px; }
.convert-bar p { max-width: 650px; margin: 13px auto 0; color: var(--muted); font-size: 13px; }

.format-guide, .how { padding: 35px 0 82px; text-align: center; }
.format-guide h2, .how h2, .faq h2 { margin: 12px auto 35px; font-size: clamp(42px, 6vw, 68px); line-height: .96; letter-spacing: -.06em; text-align: center; }
.guide-grid, .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.guide-grid article, .steps article { min-height: 205px; padding: 25px; border: 2px solid var(--ink); background: #fff; }
.guide-grid article:nth-child(2), .steps article:nth-child(2) { background: var(--lime); transform: rotate(-.45deg); }
.guide-grid article:nth-child(3), .steps article:nth-child(3) { background: #dfe7ff; transform: rotate(.4deg); }
.guide-grid h3, .steps h3 { margin: 14px 0 6px; font-size: 21px; }
.guide-grid p, .steps p { margin: 0; color: #4d5048; }
.format-tag { display: inline-block; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 950; }
.format-tag.jpg { background: var(--yellow); }.format-tag.png { background: #fff; }.format-tag.webp { background: var(--blue); color: #fff; }
.honest-box { max-width: 820px; margin: 26px auto 0; padding: 21px; border: 2px dashed var(--ink); background: var(--panel); }
.honest-box strong { font-size: 18px; }
.honest-box p { margin: 6px 0 0; color: var(--muted); }
.how { padding-top: 0; }
.steps b { font-family: Georgia, serif; font-size: 48px; font-style: italic; }
.faq { padding: 68px 0; border-top: 2px solid var(--ink); }
.faq-grid { display: grid; max-width: 830px; margin: auto; gap: 12px; }
.faq details { padding: 18px 20px; border: 2px solid var(--ink); background: #fff; }
.faq summary { display: flex; justify-content: space-between; gap: 20px; font-weight: 900; cursor: pointer; list-style: none; }
.faq summary::after { content: "+"; font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 14px 0 2px; color: var(--muted); }

footer { padding: 32px 0; background: var(--ink); color: #fff; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-inner .brand { color: #fff; }.footer-inner p { margin: 0; color: #bdbdb4; }.footer-inner a { color: #fff; }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 40; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 30px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:focus-visible { outline: 4px solid rgba(30, 83, 229, .35); outline-offset: 3px; }

@media (max-width: 760px) {
  .guide-grid, .steps { grid-template-columns: 1fr; }
  .guide-grid article, .steps article { width: 100%; max-width: 650px; margin: auto; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1060px); }
  .nav { gap: 14px; padding: 10px 0; }.navlinks a:not(.pill) { display: none; }
  .hero { padding: 42px 0 31px; } h1 { font-size: 54px; }
  .maker-note { align-items: flex-start; padding: 16px; }.maker-badge { flex-basis: 46px; height: 43px; }
  .privacy-banner { align-items: flex-start; padding: 15px; text-align: left; }
  .converter { box-shadow: 6px 6px 0 var(--ink); }
  .format-picker, .workspace { padding: 16px; }
  .format-options { grid-template-columns: 1fr; }
  .format-option { min-height: 82px; }.format-option b { font-size: 24px; }
  .optional-settings summary span { display: none; }.settings-row { grid-template-columns: 1fr; }
  .dropzone { min-height: 310px; padding: 23px 14px; }
  .file-card { grid-template-columns: 62px minmax(0, 1fr); text-align: center; }
  .thumb { width: 62px; height: 62px; }.file-actions { grid-column: 1 / -1; justify-content: center; }.stats { justify-content: center; }
  .convert-bar .btn { width: 100%; margin: 4px 0; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
