@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Regular.ttf); font-weight: 400; }
@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Medium.ttf);  font-weight: 500; }
@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Bold.ttf);    font-weight: 700; }

:root {
  --ink: #0f1d33;
  --muted: #8a93a3;
  --line: #e7e9ee;
  --bg: #fafafa;
  --card: #fff;
  --warn: #b46a00;
  --err: #c0262d;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 Satoshi, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.shell { max-width: 760px; margin: 0 auto; padding: 56px 16px 80px; }

.top { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.top h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.mark { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: 8px 0 0 -3px #c9a14a; }

/* drop zone */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        height: 220px; border: 1.5px dashed #cfd3db; border-radius: var(--r); background: var(--card);
        cursor: pointer; color: var(--muted); transition: .2s; text-align: center; padding: 16px; }
.drop svg { margin-bottom: 8px; transition: .2s; }
.drop strong { color: var(--ink); font-weight: 500; font-size: 16px; word-break: break-all; }
.drop span { font-size: 13px; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); }
.drop.over svg { transform: translateY(-3px); }
.drop.has { border-style: solid; border-color: var(--ink); }

/* options */
.opts { margin: 16px 0; border-bottom: 1px solid var(--line); }
.opts summary { list-style: none; cursor: pointer; padding: 10px 0; font-size: 14px; color: var(--muted); user-select: none; }
.opts summary::-webkit-details-marker { display: none; }
.opts summary::after { content: '+'; float: right; font-size: 18px; line-height: 1; }
.opts[open] summary::after { content: '−'; }
.opts summary:hover { color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 4px 0 20px; }
.grid label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.grid .full { grid-column: 1 / -1; }
input, select { font: inherit; font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--line);
                border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s; width: 100%; }
input:focus, select:focus { border-color: var(--ink); }
input[type=file] { padding: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border: 0; border-radius: 10px;
       background: var(--ink); color: #fff; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; transition: .15s; }
#go { width: 100%; }
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .25; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }

/* progress */
.progress { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.progress .bar { flex: 1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; position: relative; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.progress.busy .bar i { width: 30% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.error { margin-top: 14px; color: var(--err); font-size: 14px; }

/* result */
.result { margin-top: 48px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.result h2 { font-size: 17px; font-weight: 500; word-break: break-all; }
.meta { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.chip em { font-style: normal; color: var(--muted); }
.chip b { font-weight: 500; color: #c9a14a; }
.chip.warn { border-color: #f0d6a8; color: var(--warn); }
#viewer { width: 100%; aspect-ratio: 297 / 210; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }


@media (max-width: 560px) {
  .shell { padding-top: 32px; }
  .grid { grid-template-columns: 1fr; }
}
