:root {
  --paper: #f1f0e9;
  --surface: #fbfaf5;
  --ink: #151713;
  --muted: #696b63;
  --line: #cecec4;
  --lime: #c9f64a;
  --lime-dark: #9bc923;
  --red: #c84c3f;
  --shadow: 0 24px 70px rgba(30, 33, 25, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(21, 23, 19, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 23, 19, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button, a { font: inherit; }
button { color: inherit; }

.site-header, footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header { height: 82px; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 760; letter-spacing: -0.02em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-button, .account-button { min-width: 48px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 720; font-size: 12px; }
.language-button:hover, .language-button:focus-visible, .account-button:hover, .account-button:focus-visible { border-color: var(--ink); outline: none; }
.brand-mark { width: 28px; height: 28px; position: relative; display: inline-block; }
.brand-mark i { position: absolute; left: 4px; width: 20px; height: 5px; background: var(--ink); transform-origin: left center; }
.brand-mark i:nth-child(1) { top: 4px; transform: rotate(23deg); }
.brand-mark i:nth-child(2) { top: 12px; transform: rotate(-12deg); }
.brand-mark i:nth-child(3) { top: 20px; transform: rotate(18deg); }
.version-pill { border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; color: var(--muted); font-size: 12px; }

main { width: min(1180px, calc(100% - 40px)); margin: 78px auto 40px; display: grid; grid-template-columns: minmax(260px, .78fr) minmax(520px, 1.22fr); gap: 72px; align-items: start; }
.hero { position: sticky; top: 54px; padding-top: 20px; }
.eyebrow, .step-label { font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; color: var(--muted); margin: 0 0 16px; }
h1 { font-size: clamp(52px, 6.2vw, 88px); line-height: .91; letter-spacing: -.07em; margin: 0; font-weight: 810; }
h1 span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hero-copy { max-width: 460px; color: var(--muted); font-size: 17px; line-height: 1.75; margin: 30px 0 24px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { font-size: 12px; padding: 7px 10px; background: rgba(255,255,255,.45); border: 1px solid var(--line); }
.facts .primary-fact { background: var(--lime); border-color: var(--ink); font-weight: 760; }

.converter { background: var(--surface); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: 32px; }
.panel-heading, .selection-summary, .progress-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.text-button { border: 0; border-bottom: 1px solid currentColor; background: none; padding: 2px 0; cursor: pointer; color: var(--muted); font-size: 13px; }
.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.pick-card { min-height: 180px; border: 1px solid var(--line); background: transparent; padding: 20px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.pick-card:hover, .pick-card:focus-visible { transform: translateY(-3px); border-color: var(--ink); background: #fff; outline: none; }
.pick-card strong { margin-top: 22px; font-size: 15px; }
.pick-card small { margin-top: 6px; color: var(--muted); line-height: 1.4; }
.pick-icon { width: 42px; height: 35px; display: block; border: 2px solid var(--ink); position: relative; }
.folder-icon::before { content: ""; position: absolute; width: 20px; height: 8px; border: 2px solid var(--ink); border-bottom: 0; left: -2px; top: -9px; }
.files-icon { box-shadow: 5px -5px 0 -1px var(--surface), 6px -6px 0 0 var(--ink); }
.zip-icon { border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; background: var(--lime); font: 800 10px ui-monospace, monospace; }

.selection { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 26px; }
.selection-summary strong { font-size: 18px; }
.selection-summary > span { color: var(--muted); font: 600 13px ui-monospace, monospace; }
.file-summary { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.file-summary li { padding: 14px; border-right: 1px solid var(--line); }
.file-summary li:last-child { border-right: 0; }
.file-summary strong, .file-summary span { display: block; }
.file-summary strong { font-size: 20px; }
.file-summary span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.message { min-height: 20px; color: var(--red); font-size: 13px; line-height: 1.5; }
.turnstile-container { width: 100%; min-height: 4px; margin: 0 0 14px; }
.primary-button, .secondary-button { min-height: 54px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 22px; text-decoration: none; border: 1px solid var(--ink); cursor: pointer; font-weight: 720; }
.primary-button { width: 100%; background: var(--lime); color: var(--ink); }
.primary-button:hover { background: var(--lime-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .58; }
.secondary-button { background: transparent; color: var(--ink); }

.progress-panel { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.progress-topline { font-weight: 700; }
.progress-track { height: 8px; background: #deded5; margin-top: 16px; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--lime-dark); transition: width .25s ease; }
.progress-track.indeterminate i { width: 38% !important; animation: progress-sweep 1.25s ease-in-out infinite; }
@keyframes progress-sweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(275%); }
}
.progress-panel p { color: var(--muted); font-size: 13px; margin: 13px 0 0; }
.result-panel { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 62px 1fr; gap: 22px; }
.result-panel[hidden] { display: none; }
.result-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); font-size: 28px; }
.result-icon.error { background: var(--red); color: white; }
.result-copy h3 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.result-summary > p:not(.step-label) { color: var(--muted); line-height: 1.6; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 22px 0; }
.metrics div { background: var(--surface); padding: 12px; }
.metrics dt { color: var(--muted); font-size: 10px; }
.metrics dd { margin: 5px 0 0; font-weight: 750; }
.result-actions { display: flex; gap: 10px; }
.result-actions .primary-button { width: auto; flex: 1; }
.unity-preview-panel { border: 1px solid var(--line); background: #10120f; min-width: 0; }
.preview-heading { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: white; }
.preview-heading span { color: #aeb2a7; font-size: 11px; text-align: right; }
.unity-preview-panel iframe { display: block; width: 100%; aspect-ratio: 16 / 10; min-height: 520px; border: 0; background: #0e0f0d; }

main.result-view { grid-template-columns: 1fr; gap: 28px; margin-top: 38px; }
main.result-view .hero { display: none; }
main.result-view .converter, main.result-view .notice { grid-column: 1; }
main.result-view .result-copy { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }

.notice { grid-column: 2; border-left: 4px solid var(--lime-dark); padding: 4px 0 4px 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.notice strong { color: var(--ink); }
.notice p { margin: 5px 0 0; }
footer { min-height: 88px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.account-dialog { width:min(440px,calc(100% - 28px)); border:1px solid var(--ink); background:var(--surface); color:var(--ink); padding:0; box-shadow:var(--shadow); }
.account-dialog::backdrop { background:rgba(21,23,19,.5); backdrop-filter:blur(3px); }
.account-dialog .dialog-content { position:relative; padding:30px; }
.account-dialog form { margin:0; }
.account-dialog h2 { margin-bottom:10px; }
.account-dialog .dialog-content > p:not(.step-label) { color:var(--muted); line-height:1.6; }
.dialog-close { position:absolute; right:16px; top:12px; border:0; background:transparent; cursor:pointer; font-size:27px; }
.account-dialog label { display:block; margin:22px 0 7px; font-size:12px; font-weight:700; }
.account-dialog input { width:100%; height:48px; border:1px solid var(--line); background:white; padding:0 13px; margin-bottom:12px; font:inherit; }
.account-dialog .secondary-button { width:100%; margin-top:12px; }
.dialog-message { min-height:22px; color:var(--red) !important; font-size:13px; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; gap: 40px; margin-top: 46px; }
  .hero { position: static; }
  .notice { grid-column: 1; }
  h1 { font-size: clamp(50px, 13vw, 80px); }
}

@media (max-width: 600px) {
  .site-header, footer, main { width: min(100% - 24px, 1180px); }
  .site-header { height: 68px; }
  .version-pill { display: none; }
  main { margin-top: 30px; }
  .converter { padding: 22px 16px; }
  .picker { grid-template-columns: 1fr; }
  .pick-card { min-height: 112px; display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-content: center; }
  .pick-card strong { margin: 0; align-self: end; }
  .pick-card small { grid-column: 2; }
  .pick-icon { grid-row: 1 / 3; align-self: center; }
  .file-summary { grid-template-columns: 1fr; }
  .file-summary li { border-right: 0; border-bottom: 1px solid var(--line); }
  .file-summary li:last-child { border-bottom: 0; }
  .result-panel { grid-template-columns: 1fr; }
  main.result-view .result-copy { grid-template-columns: 1fr; }
  .unity-preview-panel iframe { min-height: 0; }
  .result-actions { flex-direction: column; }
  .result-actions .primary-button { width: 100%; }
  footer { align-items: flex-start; justify-content: center; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .progress-track.indeterminate i { animation-duration: 2.5s; }
}
