:root {
    color-scheme: light;
    --page-bg: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --surface-muted: rgba(0, 0, 0, 0.045);
    --titlebar-bg: rgba(246, 246, 248, 0.86);
    --fill: rgba(118, 118, 128, 0.12);
    --thumb: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --text-subtle: #a1a1a6;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --primary: #007aff;
    --primary-hover: #0069d9;
    --primary-pressed: #0058b8;
    --primary-soft: rgba(0, 122, 255, 0.1);
    --success: #1f9d47;
    --danger: #d70015;
    --discord: #5865f2;
    --discord-hover: #4752c4;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --titlebar: 38px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
    --shadow-window: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05), 0 28px 70px -20px rgba(0, 0, 0, 0.3);
    --focus-ring: rgba(0, 122, 255, 0.35);
}

[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #111113;
    --surface: rgba(40, 40, 43, 0.72);
    --surface-solid: #2c2c2e;
    --surface-muted: rgba(255, 255, 255, 0.07);
    --titlebar-bg: rgba(52, 52, 56, 0.8);
    --fill: rgba(118, 118, 128, 0.26);
    --thumb: #636366;
    --text-main: #f5f5f7;
    --text-muted: #98989d;
    --text-subtle: #636366;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);
    --primary: #0a84ff;
    --primary-hover: #409cff;
    --primary-pressed: #0071e3;
    --primary-soft: rgba(10, 132, 255, 0.18);
    --success: #30d158;
    --danger: #ff453a;
    --discord: #6670ff;
    --discord-hover: #7b84ff;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --shadow-window: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.3), 0 30px 80px -18px rgba(0, 0, 0, 0.75);
    --focus-ring: rgba(10, 132, 255, 0.5);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    background: var(--page-bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 데스크톱 배경화면 느낌의 흐린 그라데이션 */
body::before {
    position: fixed;
    inset: -10%;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(40% 45% at 18% 12%, rgba(0, 122, 255, 0.2), transparent 70%),
        radial-gradient(35% 40% at 85% 18%, rgba(175, 82, 222, 0.16), transparent 70%),
        radial-gradient(45% 40% at 60% 100%, rgba(255, 149, 0, 0.12), transparent 70%);
    filter: blur(20px);
    animation: wallpaper-drift 28s ease-in-out infinite alternate;
}

[data-theme="dark"] body::before {
    background:
        radial-gradient(40% 45% at 18% 12%, rgba(10, 132, 255, 0.22), transparent 70%),
        radial-gradient(35% 40% at 85% 18%, rgba(191, 90, 242, 0.16), transparent 70%),
        radial-gradient(45% 40% at 60% 100%, rgba(255, 159, 10, 0.08), transparent 70%);
}

a {
    color: var(--primary);
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

/* ---------- 메뉴 막대 ---------- */

.floating-navbar {
    position: sticky;
    z-index: 20;
    top: 0;
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 8px max(20px, calc((100vw - 1120px) / 2));
    background: var(--surface);
    border-bottom: 0.5px solid var(--border);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    view-transition-name: navbar;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 650;
    white-space: nowrap;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 9px;
    color: #ffffff;
    background: linear-gradient(180deg, #4aa3ff, #007aff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px -4px rgba(0, 122, 255, 0.6);
    transition: transform 0.3s var(--ease);
}

.brand:hover .brand-icon {
    transform: rotate(-8deg) scale(1.06);
}

.brand-icon svg,
.nav-dropdown-trigger svg,
.theme-toggle svg,
.discord-icon {
    fill: currentColor;
}

.brand-icon svg {
    width: 19px;
    height: 19px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nav-links a,
.nav-dropdown-trigger {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    color: var(--text-muted);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active,
.nav-dropdown:focus-within .nav-dropdown-trigger {
    color: var(--text-main);
    background: var(--surface-muted);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.25s var(--ease);
}

.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown.open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    min-width: 190px;
    display: grid;
    gap: 2px;
    padding: 5px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-window);
    translate: -50% 0;
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.22s var(--ease), visibility 0.18s;
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
}

/* 호버 중 메뉴로 내려가는 틈 */
.dropdown-menu::before {
    position: absolute;
    inset: -10px 0 auto;
    height: 10px;
    content: "";
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.dropdown-menu a {
    justify-content: flex-start;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 6px;
}

.dropdown-menu a:hover {
    color: #ffffff;
    background: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.theme-toggle,
.support-button,
.primary-link,
.secondary-link,
.download-panel button {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s var(--ease), opacity 0.2s ease;
}

.theme-toggle {
    margin: 0;
    border: 0;
    padding: 0 12px;
    color: var(--text-main);
    background: var(--surface-muted);
    cursor: pointer;
}

.theme-toggle:hover,
.secondary-link:hover {
    background: var(--fill);
}

.theme-toggle:active,
.support-button:active,
.primary-link:active,
.secondary-link:active,
.download-panel button:active {
    transform: scale(0.97);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    animation: icon-spin-in 0.4s var(--ease);
}

.theme-toggle .moon-icon,
[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: inline-block;
}

.support-button {
    padding: 0 14px;
    color: #ffffff;
    background: var(--discord);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.support-button:hover {
    background: var(--discord-hover);
}

.discord-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

/* ---------- 레이아웃 ---------- */

.app-shell,
.legal-shell {
    flex: 1;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s var(--ease), filter 0.3s ease;
}

.app-shell {
    display: grid;
    align-items: center;
    padding: 72px 20px 80px;
}

.hero-section {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    min-width: 0;
}

.hero-copy > *,
.download-panel,
.legal-document {
    animation: rise 0.7s var(--ease) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.05s; }
.hero-copy > :nth-child(3) { animation-delay: 0.1s; }
.hero-copy > :nth-child(4) { animation-delay: 0.15s; }
.hero-copy > :nth-child(5) { animation-delay: 0.2s; }
.download-panel { animation-delay: 0.12s; }

.pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pill::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 20%, transparent);
    content: "";
    animation: pulse 2.4s ease-in-out infinite;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.hero-copy h1 span {
    color: transparent;
    background: linear-gradient(90deg, #007aff, #af52de);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .hero-copy h1 span {
    background-image: linear-gradient(90deg, #409cff, #da8fff);
}

.subtext {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: 1.06rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.primary-link,
.secondary-link {
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 0.95rem;
}

.primary-link {
    color: #ffffff;
    background: var(--primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 20px -8px rgba(0, 122, 255, 0.6);
}

.primary-link:hover {
    background: var(--primary-hover);
}

.secondary-link {
    color: var(--text-main);
    background: var(--surface-muted);
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.trust-list span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--surface-muted);
    font-size: 0.8rem;
    font-weight: 550;
}

.trust-list span::before {
    color: var(--success);
    font-weight: 800;
    content: "✓";
}

/* ---------- 창 (다운로드 패널 · 문서) ---------- */

.download-panel,
.legal-document {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-window);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
}

/* 신호등 버튼이 있는 타이틀바 */
.download-panel::before,
.legal-document::before {
    position: absolute;
    inset: 0 0 auto;
    height: var(--titlebar);
    border-bottom: 0.5px solid var(--border);
    content: "";
    background:
        radial-gradient(circle at 20px 50%, #ff5f57 5.5px, transparent 6px),
        radial-gradient(circle at 40px 50%, #febc2e 5.5px, transparent 6px),
        radial-gradient(circle at 60px 50%, #28c840 5.5px, transparent 6px),
        var(--titlebar-bg);
}

.download-panel {
    max-width: 500px;
    justify-self: end;
    padding: calc(var(--titlebar) + 22px) 24px 24px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.panel-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 1.2rem;
    font-weight: 800;
}

.download-panel.is-busy .panel-icon {
    animation: bob 1s ease-in-out infinite;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

h1,
h2 {
    margin: 0;
    line-height: 1.25;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.03em;
}

h2 {
    margin-top: 30px;
    font-size: 1.12rem;
}

p,
li {
    line-height: 1.7;
}

form {
    display: grid;
    gap: 16px;
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-label {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

input[type="url"] {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0 12px;
    color: var(--text-main);
    background: var(--surface-solid);
    box-shadow: inset 0 0 0 0.5px var(--border-strong), 0 0.5px 1px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    outline: 0;
    transition: box-shadow 0.2s ease;
}

input[type="url"]::placeholder {
    color: var(--text-subtle);
}

input[type="url"]:focus {
    box-shadow: inset 0 0 0 1px var(--primary), 0 0 0 4px var(--focus-ring);
}

/* 세그먼트 컨트롤 */
.segmented {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 2px;
    border-radius: 9px;
    background: var(--fill);
}

.segmented::before {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc(50% - 2px);
    border-radius: 7px;
    background: var(--thumb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    content: "";
    transition: transform 0.32s var(--ease);
}

.segmented:has(label:nth-child(2) input:checked)::before {
    transform: translateX(100%);
}

.segmented label {
    position: relative;
    min-height: 32px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.segmented label:has(input:checked) {
    color: var(--text-main);
}

.segmented label:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.download-panel button {
    width: 100%;
    min-height: 40px;
    margin-top: 2px;
    border: 0;
    padding: 0 18px;
    color: #ffffff;
    background: var(--primary);
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px -8px rgba(0, 122, 255, 0.7);
}

.download-panel button:hover {
    background: var(--primary-hover);
}

.download-panel button:active {
    background: var(--primary-pressed);
}

.download-panel button:disabled {
    cursor: progress;
    opacity: 0.75;
    transform: none;
}

.download-panel button .spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.download-panel button.loading .spinner {
    display: inline-block;
}

input[type="url"]:focus-visible,
.download-panel button:focus-visible,
.support-button:focus-visible,
.theme-toggle:focus-visible,
.nav-dropdown-trigger:focus-visible,
.nav-links a:focus-visible,
.primary-link:focus-visible,
.secondary-link:focus-visible {
    box-shadow: 0 0 0 4px var(--focus-ring);
    outline: none;
}

/* 진행 바 */
.progress {
    height: 0;
    margin-top: 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--fill);
    opacity: 0;
    transition: height 0.3s var(--ease), margin 0.3s var(--ease), opacity 0.3s ease;
}

.progress.active {
    height: 6px;
    margin-top: 18px;
    opacity: 1;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #5ac8fa);
    transition: width 0.25s ease, background-color 0.3s ease;
}

.progress.indeterminate .progress-fill {
    width: 35%;
    animation: indeterminate 1.4s cubic-bezier(0.65, 0.05, 0.35, 1) infinite;
}

.progress.done .progress-fill {
    background: var(--success);
}

.progress.failed .progress-fill {
    width: 100%;
    background: var(--danger);
}

.status {
    min-height: 24px;
    margin: 12px 0 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 550;
}

.status.pop {
    animation: rise 0.35s var(--ease);
}

.status.error {
    color: var(--danger);
}

.status.success {
    color: var(--success);
}

.download-preview {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.file-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    box-shadow: inset 0 0 0 1px transparent;
    opacity: 0.55;
    transition: opacity 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease);
}

.download-panel:has(input[value="mp3"]:checked) .file-row[data-format="mp3"],
.download-panel:has(input[value="mp4"]:checked) .file-row[data-format="mp4"] {
    opacity: 1;
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
    transform: scale(1.01);
}

.file-row strong {
    display: block;
    overflow: hidden;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row small {
    display: block;
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.file-type {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, #4aa3ff, #007aff);
    font-size: 0.68rem;
    font-weight: 800;
}

.file-row[data-format="mp3"] .file-type {
    background: linear-gradient(180deg, #ff6b8a, #ff2d55);
}

.badge {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    color: var(--success);
    background: color-mix(in srgb, var(--success) 14%, transparent);
    font-size: 0.72rem;
    font-weight: 700;
}

.hint {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- 문서 페이지 ---------- */

.legal-shell {
    padding: 48px 20px 72px;
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--titlebar) + 36px) 40px 40px;
}

.legal-document > .subtext {
    margin-bottom: 28px;
}

.legal-date {
    margin: 8px 0 28px;
    color: var(--text-muted);
    font-size: 0.93rem;
}

.legal-document section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 0.5px solid var(--border-strong);
}

.legal-document section:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.legal-document h2 {
    margin-top: 0;
    font-size: 1.15rem;
    font-weight: 650;
}

.legal-document p {
    margin: 10px 0 0;
    color: var(--text-muted);
}

.legal-document ul {
    margin: 10px 0 0;
    padding-left: 22px;
    color: var(--text-muted);
}

.legal-document li + li {
    margin-top: 4px;
}

.endpoint-row,
.status-grid > div {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: var(--surface-muted);
    border-radius: var(--radius-md);
}

.endpoint-row {
    grid-template-columns: minmax(190px, auto) 1fr;
    align-items: center;
}

.endpoint-row span {
    color: var(--text-muted);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.status-grid strong {
    font-size: 1.1rem;
}

.status-grid span {
    color: var(--text-muted);
    line-height: 1.55;
}

code {
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

pre {
    overflow-x: auto;
    margin: 14px 0 0;
    padding: 18px;
    background: #1d1d1f;
    border-radius: var(--radius-md);
    color: #f5f5f7;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] pre {
    background: #0b0b0d;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px max(20px, calc((100vw - 1120px) / 2));
    color: var(--text-muted);
    background: var(--surface);
    border-top: 0.5px solid var(--border);
    font-size: 0.85rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-footer a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: var(--text-main);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer p {
    margin: 0;
    text-align: right;
}

/* ---------- 페이지 전환 ---------- */

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: page-out 0.22s ease both;
}

::view-transition-new(root) {
    animation: page-in 0.32s var(--ease) both;
}

/* 외부 페이지(고객지원)로 이동할 때 */
body.is-leaving .app-shell,
body.is-leaving .legal-shell {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(4px);
}

/* ---------- 반응형 ---------- */

@media (max-width: 960px) {
    .floating-navbar {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .nav-links {
        grid-column: 1 / -1;
        order: 3;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .download-panel {
        max-width: none;
        justify-self: stretch;
    }

    .endpoint-row,
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .floating-navbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 10px 16px;
    }

    .brand,
    .nav-links,
    .nav-actions {
        justify-content: center;
    }

    .brand {
        white-space: normal;
    }

    .nav-actions {
        flex-wrap: wrap;
    }

    .theme-toggle,
    .support-button {
        flex: 1 1 140px;
    }

    .dropdown-menu {
        left: auto;
        right: 0;
        translate: none;
        transform-origin: top right;
    }

    .app-shell {
        padding: 40px 16px 56px;
    }

    .hero-copy h1 {
        font-size: 2.2rem;
    }

    .hero-actions,
    .primary-link,
    .secondary-link {
        width: 100%;
    }

    .download-panel {
        padding: calc(var(--titlebar) + 18px) 18px 18px;
    }

    .legal-document {
        padding: calc(var(--titlebar) + 24px) 20px 24px;
    }

    .file-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .badge {
        grid-column: 2;
        width: fit-content;
    }

    .legal-shell {
        padding: 28px 16px 56px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer p {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after,
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .progress.indeterminate .progress-fill {
        width: 100%;
        opacity: 0.6;
    }
}

/* ---------- 키프레임 ---------- */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes page-out {
    to {
        opacity: 0;
        transform: scale(0.985);
        filter: blur(3px);
    }
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: scale(1.01);
    }
}

@keyframes indeterminate {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(290%);
    }
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 6px transparent;
    }
}

@keyframes bob {
    50% {
        transform: translateY(3px);
    }
}

@keyframes icon-spin-in {
    from {
        opacity: 0;
        transform: rotate(-90deg) scale(0.6);
    }
}

@keyframes wallpaper-drift {
    to {
        transform: translate3d(3%, 2%, 0) scale(1.05);
    }
}
