:root {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    color: #172033;
    background: #f5f7fb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 0%, #e7f7f3, transparent 35%), #f5f7fb;
}

.site-header, .site-footer {
    border-bottom: 1px solid #e3e8f1;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(12px);
}

.site-header-inner, .site-footer-inner {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header-inner { min-height: 72px; }
.site-footer { border-top: 1px solid #e3e8f1; border-bottom: 0; }
.site-footer-inner { min-height: 76px; color: #7b879b; font-size: .84rem; }
.site-footer a { color: #087c69; font-weight: 750; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.logo { color: #172033; font-weight: 850; letter-spacing: -.04em; text-decoration: none; }
.logo-mark { color: #0d9f86; }
.header-meta { display: flex; align-items: center; gap: 16px; }
.header-credit { color: #7b879b; font-size: .82rem; }
.header-credit a { color: #087c69; font-weight: 750; text-decoration: none; }
.header-credit a:hover { text-decoration: underline; }
.version { padding: 6px 10px; border: 1px solid #d5e8e3; border-radius: 999px; color: #087c69; font-size: .76rem; font-weight: 750; }

main { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 80px; }
.brand { color: #0d9f86; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 12px 0 10px; font-size: clamp(2.2rem, 6vw, 4.2rem); letter-spacing: -.06em; line-height: .98; }
.lead { color: #68738a; font-size: 1.05rem; line-height: 1.65; max-width: 600px; }
.card { background: rgba(255,255,255,.86); border: 1px solid #e3e8f1; border-radius: 24px; box-shadow: 0 18px 55px rgba(37,51,78,.09); padding: 28px; margin-top: 32px; }
.upload { border: 2px dashed #bfd9d3; border-radius: 18px; padding: 34px 20px; text-align: center; background: #f7fffd; }
.upload strong { display: block; font-size: 1.05rem; margin-bottom: 8px; }
.upload span { color: #7b879b; font-size: .9rem; }
.picker-row { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.file-picker { display: block; width: fit-content; margin: 20px auto 0; padding: 11px 17px; border: 1px solid #b9d8d1; border-radius: 10px; background: #fff; color: #087c69; font-size: .92rem; font-weight: 750; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.picker-row .file-picker { margin: 0; }
.file-picker:hover { background: #e9faf6; border-color: #0d9f86; transform: translateY(-1px); }
.file-picker:focus-within { outline: 3px solid rgba(13,159,134,.22); outline-offset: 2px; }
input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
button, .download { border: 0; border-radius: 12px; padding: 14px 20px; background: #0d9f86; color: #fff; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; }
button { width: 100%; margin-top: 18px; }
.download { display: block; width: 100%; text-align: center; }
button:disabled { cursor: wait; opacity: .78; }
.spinner { display: inline-block; width: 15px; height: 15px; margin-right: 9px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button:hover, .download:hover { background: #087c69; }
.preview-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 20px; }
.preview-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: #eef2f5; }
.video-preview { display: none; width: 100%; max-height: 380px; margin-top: 20px; border-radius: 14px; background: #eef2f5; }
.selection-summary { color: #087c69; font-size: .86rem; font-weight: 750; margin: 16px 0 0; }
.result { display: block; width: 100%; max-height: 560px; object-fit: contain; border-radius: 14px; margin: 20px 0; background: #eef2f5; }
.result-item { border-top: 1px solid #e3e8f1; padding-top: 18px; margin-top: 18px; }
.result-item:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.zip-button { margin-top: 22px; }
.output-placeholder { display: grid; place-items: center; min-height: 220px; border: 1px dashed #d5dce7; border-radius: 14px; color: #8a95a7; text-align: center; }
.output-processing { gap: 10px; color: #087c69; font-weight: 750; }
.output-spinner { width: 22px; height: 22px; border: 3px solid #cce9e3; border-top-color: #0d9f86; border-radius: 50%; animation: spin .7s linear infinite; }
.result-meta { color: #748097; font-size: .88rem; }
.notice { padding: 14px 16px; border-radius: 12px; margin-top: 22px; line-height: 1.5; }
.error { background: #fff0f1; color: #ad3447; }
.privacy { color: #8792a5; font-size: .84rem; margin: 16px 0 0; text-align: center; }
.video-note { color: #748097; font-size: .84rem; line-height: 1.5; margin: 14px 0 0; text-align: center; }
code { color: #087c69; }
@media (max-width: 620px) {
    main { padding-top: 42px; }
    .card { padding: 18px; border-radius: 18px; }
    .site-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
    .header-meta { align-items: flex-end; flex-direction: column; gap: 4px; }
    .header-credit { font-size: .72rem; }
    .picker-row { flex-wrap: wrap; }
}
