* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --navy: #071b34;
    --ink: #102c4b;
}
html { min-width: 320px; min-height: 100%; background: var(--navy); }
body {
    min-height: 100vh;
    margin: 0;
    padding: clamp(28px, 5vh, 58px) 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #071b34;
    background-image:
        radial-gradient(ellipse at 50% 46%, rgba(7, 105, 157, .25), transparent 58%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 520' preserveAspectRatio='none'%3E%3Cpath d='M-40 270 C140 150 215 150 360 270 S590 400 760 265 S1030 140 1190 255 S1370 350 1490 210' fill='none' stroke='%2300b9d3' stroke-width='3' opacity='.53'/%3E%3Cpath d='M-40 315 C125 215 250 190 385 300 S610 415 790 300 S1010 185 1170 295 S1370 390 1490 260' fill='none' stroke='%231c87e7' stroke-width='2' opacity='.62'/%3E%3Cpath d='M-40 350 C140 270 265 240 400 330 S625 445 800 335 S1010 235 1170 335 S1370 420 1490 305' fill='none' stroke='%2300d5df' stroke-width='1.5' opacity='.4'/%3E%3C/svg%3E"),
        radial-gradient(ellipse at 50% 0%, rgba(19, 101, 158, .3), transparent 55%),
        linear-gradient(145deg, #06172d 0%, #08284a 52%, #06203c 100%);
    background-position: center, center, center, center;
    background-size: cover, 100% 58%, cover, cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.container {
    position: relative;
    width: min(100%, 630px);
    padding: 0 clamp(18px, 4.8vw, 38px) 33px;
    border: 2px solid rgba(37, 213, 223, .88);
    border-radius: 37px;
    color: var(--ink);
    text-align: center;
    background: linear-gradient(160deg, #fff 0%, #f6fbff 100%);
    box-shadow: 0 28px 90px rgba(0, 7, 21, .5), 0 0 23px rgba(14, 198, 220, .24), inset 0 0 0 1px rgba(255,255,255,.92);
}
.brand-header {
    position: relative;
    isolation: isolate;
    margin: 0 calc(0px - clamp(18px, 4.8vw, 38px));
    padding: 13px 13px 25px;
    overflow: hidden;
    border-radius: 34px 34px 0 0;
    color: #f6fcff;
    background: radial-gradient(ellipse at 50% 0%, rgba(14, 159, 192, .21), transparent 62%), linear-gradient(145deg, #06213e 0%, #0a3454 65%, #092746 100%);
}
.brand-title {
    --logo-size: clamp(23px, 5.6vw, 51px);
    display: grid;
    grid-template-columns: var(--logo-size) minmax(0, 1fr) var(--logo-size);
    align-items: center;
    gap: clamp(5px, 1.2vw, 13px);
}
.brand-logo {
    display: block;
    width: var(--logo-size);
    border-radius: 14px;
    overflow: hidden;
}
.brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}
h1 { position: relative; z-index: 2; margin: 0; color: #fff; font-size: clamp(24px, 4.8vw, 42.4px); font-weight: 850; line-height: 1.08; letter-spacing: -.055em; text-shadow: 0 4px 24px rgba(14, 199, 218, .2); }
.brand-title h1 { container-type: inline-size; }
.title-line { display: block; white-space: nowrap; font-size: min(1em, 9cqi); }
.brand-header .title-accent, #back { color: #18d3db; }
label { display: block; font-weight: 750; margin-bottom: 7px; }
.workspace { text-align: left; padding-top: 22px; }
p { margin: 0 0 10px; line-height: 1.5; }
#back {
    display: block;
    width: fit-content;
    margin: 0 0 10px 3px;
    padding: 7px 10px;
    border: 1px solid rgba(24, 211, 219, .38);
    border-radius: 10px;
    background: rgba(24, 211, 219, .09);
    text-decoration: none;
    font-size: .875rem;
    line-height: 1.4;
    font-weight: 750;
}
#back:hover { background: rgba(24, 211, 219, .16); }
#back:focus-visible { outline-color: #18d3db; }
.conversion-status {
    --status-height: 168px;
    height: var(--status-height);
    min-height: var(--status-height);
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #badfdf;
    border-radius: 16px;
    background: #dff3f3;
    color: #07528c;
    font-size: .8125rem;
}
/* Normal status lines and filenames wrap more often on narrow screens. */
@media (max-width: 425px) {
    .conversion-status { --status-height: 177px; }
}
@media (max-width: 380px) {
    .conversion-status { --status-height: 193px; }
}
.conversion-status h2 { margin: 0 0 3px; font-size: .9375rem; }
#url-status {
    display: grid;
    gap: 2px;
    margin: 0;
    padding-inline-start: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
#url-status .download-tip {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 4px 0 0 -17px;
    padding-top: 5px;
    border-top: 1px solid #badfdf;
}
.download-folder {
    position: relative;
    width: 13px;
    height: 9px;
    flex: none;
    margin-top: 2px;
    border: 1px solid currentColor;
    border-radius: 2px;
}
.download-folder::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -1px;
    width: 6px;
    height: 3px;
    border: 1px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
}

:focus-visible { outline: 3px solid #0879bb; outline-offset: 2px; }
@media (max-width: 767px) {
    .brand-title { --logo-size: clamp(22px, 5.6vw, 45px); }
}
@media (max-width: 620px) {
    body { padding: 22px 12px; }
    .container { padding: 0 16px 24px; border-radius: 27px; }
    .brand-header { margin-inline: -16px; border-radius: 24px 24px 0 0; }
}

@media (max-width: 480px) {
    .brand-title h1 { font-size: clamp(19.2px, 5.6vw, 24px); }
}

.converter-privacy { margin-top: 14px; color: #244f71; font-size: .85rem; }
.converter-privacy summary { cursor: pointer; font-weight: 700; }
.converter-privacy p { margin: 8px 0 0; }
.converter-privacy a { color: #07528c; overflow-wrap: anywhere; }

/* Preserve the drop zone height while allowing the panel to span the content. */
.url-card {
    display: grid;
    justify-items: center;
    --previous-content-width: calc(min(100vw - 40px, 740px) - 4px - 2 * clamp(23px, 6vw, 48px));
    --previous-panel-width: calc((var(--previous-content-width) - 21.5px) / 2 - clamp(9px, 2vw, 17px));
    width: 100%;
    height: 301.5625px;
    margin-inline: auto;
    padding: 12px 10px;
    border: 1px solid #badfdf;
    border-radius: 16px;
    color: #07528c;
    text-align: center;
    font-size: clamp(1.125rem, 2.8vw, 1.3125rem);
    font-weight: 700;
    line-height: 1.5;
    contain: size;
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    row-gap: 4px;
    background: #dff3f3;
}
.url-card label { margin: 0; font-size: clamp(12px, (var(--previous-panel-width) - 22px) * .06, 16px); font-weight: inherit; }
#url-drop {
    display: flex;
    position: relative;
    align-items: center;
    width: 100%;
    min-height: 0;
    justify-content: center;
    border: 2px dashed #397F9F;
    border-radius: 9px;
    background-color: #f5fcfe;
    background-image:
        linear-gradient(transparent 28%, rgba(245, 252, 254, .72) 50%, transparent 72%),
        url("drop-zone-musicians.png");
    background-position: center, center bottom;
    background-repeat: no-repeat;
    background-size: 100% 100%, contain;
    padding-inline: 9px;
}
#url-drop.dragging, #url-drop:focus-within { border-color: #07528c; background-color: #fff; }
.link-icon { flex: none; font-size: 1.2rem; }
#ug-url {
    min-width: 0;
    width: 206px;
    background: transparent;
    border: 0;
    padding: 8px 3px;
    color: inherit;
    font: inherit;
    font-size: 1.125rem;
    text-align: center;
}
#ug-url::placeholder { color: #07528c; font-size: 0.875em; opacity: 1; }
#url-drop.has-url #ug-url {
    width: 100%;
    padding-right: 31px;
    text-align: left;
}
#clear-url {
    position: absolute;
    right: 5px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}
#clear-url:hover { background: #dff3f3; }
@media (540px < width < 750px) {
    .url-card {
        --previous-button-height: 82px;
        height: calc(var(--previous-button-height) + clamp(192.75px, 32px + 25vw, 219.5625px));
    }
}
@media (540px < width < 614px), (620px < width < 682px) {
    .url-card { --previous-button-height: 107px; }
}
@media (max-width: 620px) {
    .url-card { --previous-content-width: calc(100vw - 60px); }
}
@media (max-width: 540px) {
    .url-card { height: 204.78125px; }
    .url-card label { font-size: 14px; line-height: 15px; }
    #url-hint { line-height: 16px; }
}
@media (max-width: 503px) { .url-card { height: 231.75px; } }
@media (max-width: 454px) { .url-card { height: 247.75px; } }
@media (max-width: 366px) { .url-card { height: 274.75px; } }
