        :root {
            /* Built on styles/tokens.css (--bg, --ink, --accent ...). */
            --paper: color-mix(in srgb, var(--bg) 55%, #fff);
            --primary: var(--ink);
            --primary-hover: color-mix(in srgb, var(--ink), #fff 12%);
            --secondary: var(--accent);
            --background: var(--bg);
            --surface: var(--card);
            --text-primary: var(--ink);
            --text-secondary: var(--ink-soft);
            --text-muted: var(--ink-faint);
            --border: var(--line-strong);
            --border-light: var(--line);
            --white: var(--paper);
            --gray-50: var(--card);
            --gray-100: color-mix(in srgb, var(--bg), var(--ink) 4%);
            --gray-200: color-mix(in srgb, var(--bg), var(--ink) 8%);
            --gray-300: color-mix(in srgb, var(--bg), var(--ink) 16%);
            --gray-400: color-mix(in srgb, var(--bg), var(--ink) 38%);
            --gray-500: color-mix(in srgb, var(--bg), var(--ink) 52%);
            --gray-600: color-mix(in srgb, var(--bg), var(--ink) 64%);
            --gray-700: color-mix(in srgb, var(--bg), var(--ink) 76%);
            --gray-800: color-mix(in srgb, var(--bg), var(--ink) 88%);
            --gray-900: var(--ink);
            --shadow-sm: 0 1px 2px 0 rgba(39, 38, 30, 0.05);
            --shadow: 0 1px 3px 0 rgba(39, 38, 30, 0.08), 0 1px 2px 0 rgba(39, 38, 30, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(39, 38, 30, 0.08), 0 2px 4px -1px rgba(39, 38, 30, 0.05);
            --shadow-lg: 0 10px 15px -3px rgba(39, 38, 30, 0.08), 0 4px 6px -2px rgba(39, 38, 30, 0.04);
            --shadow-xl: 0 20px 25px -5px rgba(39, 38, 30, 0.08), 0 10px 10px -5px rgba(39, 38, 30, 0.03);
            --error: #dc3545;
            --success: var(--ok);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        html {
            width: 100%;
            overflow-x: hidden;
        }
        
        body {
            font-family: var(--font-sans);
            background-color: var(--background);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
            width: 100%;
            min-width: 0;
        }
        
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
            width: 100%;
            box-sizing: border-box;
        }
        
        nav {
            background-color: color-mix(in srgb, var(--bg) 86%, transparent);
            border-bottom: none;
            position: fixed;
            width: 100%;
            left: 0;
            right: 0;
            margin: 0 auto;
            top: 0;
            z-index: 1000;
            transition: all 0.3s ease;
            backdrop-filter: blur(12px);
        }

        nav.scrolled {
            box-shadow: none;
            border-radius: 0;
            background: color-mix(in srgb, var(--bg) 86%, transparent);
        }
        
        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0;
            height: 64px;
        }
        
        .logo {
            font-size: 17px;
            font-weight: 500;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            letter-spacing: 0.02em;
        }
        
        .logo img,
        .logo svg {
            width: 32px;
            height: 32px;
        }
        
        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }
        
        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }
        
        .nav-links a:hover {
            color: var(--primary);
        }
        
        .nav-button {
            background-color: transparent;
            color: var(--primary);
            padding: 0 14px;
            border: 1px solid var(--line-strong);
            border-radius: 999px;
            text-decoration: none;
            font-weight: 400;
            transition: all 0.3s ease;
            display: inline-block;
            height: 32px;
            line-height: 30px;
            font-size: 14px;
        }
        
        .nav-button:hover {
            background-color: var(--pill);
            border-color: var(--line-strong);
        }
        
        .user-info {
            background-color: var(--pill);
            border-radius: 999px;
            padding: 0.375rem 0.875rem 0.375rem 0.5rem;
            margin-right: 1rem;
            font-size: 0.875rem;
            color: var(--text-secondary);
            display: none;
            align-items: center;
            gap: 0.5rem;
            max-width: 60vw;
            white-space: normal; /* 줄바꿈 허용 */
            word-break: break-word; /* 긴 이메일 등 강제 줄바꿈 */
            line-height: 1.3;
        }
        
        .user-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background-color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            font-weight: 500;
        }
        
        .main-content {
            margin-top: 0;
            padding: 112px 0 40px 0;
            min-height: calc(100vh - 80px);
        }
        
        .translate-container {
            padding: 0;
            margin-bottom: 2rem;
            display: flex;
            gap: 2rem;
            align-items: flex-start;
            width: 100%;
        }

        .pdf-preview-section {
            flex: 0 0 calc(50% - 1rem);
            width: calc(50% - 1rem);
            background-color: var(--card);
            border-radius: 4px;
            padding: 1.5rem;
            box-shadow: none;
            border: none;
        }

        .pdf-preview-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border-light);
        }

        .pdf-preview-header h3 {
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--text-primary);
        }

        .pdf-preview-container {
            position: relative;
            background-color: var(--paper);
            border-radius: 4px;
            width: 100%;
            aspect-ratio: 1 / 1.414; /* A4 비율 */
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        /* 스크롤 모드: 여러 페이지 세로 스크롤 */
        .pdf-preview-container.scroll-mode {
            aspect-ratio: auto;
            overflow-y: auto;
            max-height: 70vh;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 1rem;
        }

        .pdf-pages {
            width: 100%;
        }

        .pdf-page-canvas {
            display: block;
            width: 100%;
            margin: 0 auto 1rem;
            box-shadow: var(--shadow-sm);
            border-radius: 4px;
        }

        .pdf-preview-placeholder {
            text-align: center;
            color: var(--text-muted);
            padding: 2rem;
        }

        .pdf-preview-placeholder .icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
        }

        .pdf-preview-placeholder .icon svg {
            width: 64px;
            height: 64px;
            color: var(--gray-200); /* 업로드 이모티콘 배지 배경색과 동일 */
        }

        .pdf-canvas {
            max-width: 100%;
            max-height: 100%;
            box-shadow: var(--shadow-sm);
            border-radius: 4px;
            object-fit: contain;
        }

        .pdf-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            margin-top: 1rem;
        }

        .pdf-control-btn {
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 999px;
            padding: 0.5rem 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.875rem;
        }

        .pdf-control-btn:hover {
            background: var(--gray-50);
        }

        .pdf-control-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .page-info {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .pdf-upload-section {
            flex: 0 0 calc(50% - 1rem);
            width: calc(50% - 1rem);
        }
        
        .translate-header {
            text-align: center;
            margin-bottom: 3rem;
            max-width: 1280px;
            margin: 0 auto 3rem auto;
            padding: 0 20px;
        }
        
        .translate-header h1 {
            font-size: 30px;
            font-weight: 400;
            margin-top: 0;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
            letter-spacing: -0.02em;
        }
        
        .translate-header p {
            font-size: 1.125rem;
            color: var(--text-secondary);
        }

        /* 상시 공지 패널 (헤더 우측 여백) */
        .main-content > .container {
            position: relative;
        }

        .notice-panel {
            display: none;
            position: absolute;
            top: 0;
            right: 20px;
            width: 320px;
            background-color: var(--paper);
            border: 1px solid var(--line);
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(39, 38, 30, 0.08);
            padding: 0.75rem 1rem;
            z-index: 50;
            max-height: 120px;
            overflow: hidden;
            transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
        }

        .notice-panel.visible {
            display: block;
        }

        .notice-panel-header {
            display: flex;
            align-items: center;
            gap: 0.375rem;
            margin-bottom: 0.375rem;
        }

        .notice-panel-header svg {
            width: 16px;
            height: 16px;
            color: var(--secondary);
            flex-shrink: 0;
        }

        .notice-panel-title {
            font-size: 0.8125rem;
            font-weight: 500;
            color: var(--text-secondary);
            flex: 1;
        }

        .notice-list {
            transition: opacity 0.2s ease;
            max-height: 67px;
            overflow-y: auto;
            scrollbar-gutter: stable;
        }

        .notice-list::-webkit-scrollbar {
            width: 6px;
        }

        .notice-list::-webkit-scrollbar-thumb {
            background: var(--gray-300);
            border-radius: 3px;
        }

        .notice-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.375rem 0.25rem;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.15s ease;
            width: 100%;
            border: none;
            background: none;
            color: inherit;
            font: inherit;
            text-align: left;
        }

        .notice-row:hover {
            background-color: var(--gray-50);
        }

        .notice-row:focus-visible {
            outline: 2px solid var(--secondary);
            outline-offset: -2px;
        }

        .notice-row .announcement-badge {
            flex-shrink: 0;
            margin-bottom: 0;
            font-size: 12px;
        }

        .notice-row-title {
            flex: 1;
            min-width: 0;
            font-size: 0.8125rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .notice-unread-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--accent);
            flex-shrink: 0;
        }

        /* 줄 오른쪽 작은 썸네일(영상이면 ▶를 겹친다) */
        .notice-row-thumb {
            position: relative;
            display: grid;
            place-items: center;
            flex-shrink: 0;
            width: 40px;
            height: 24px;
            border-radius: 4px;
            overflow: hidden;
            background: linear-gradient(135deg, var(--accent-tint), var(--pill));
            box-shadow: 0 0 0 1px var(--line);
        }

        .notice-row-thumb img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .notice-row-play {
            position: relative;
            display: grid;
            place-items: center;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            color: var(--ink);
            font-size: 6px;
            padding-left: 1px;
        }

        /* 공지 로딩 스켈레톤 */
        .notice-skeleton-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.25rem 0.25rem;
        }

        .notice-skeleton-bar {
            height: 10px;
            border-radius: 5px;
            background: linear-gradient(90deg, var(--card) 25%, var(--line-strong) 37%, var(--card) 63%);
            background-size: 400% 100%;
            animation: noticeSkeletonShimmer 1.4s ease infinite;
        }

        .notice-skeleton-bar.badge {
            width: 34px;
            height: 14px;
            border-radius: 999px;
            flex-shrink: 0;
        }

        @keyframes noticeSkeletonShimmer {
            0% { background-position: 100% 50%; }
            100% { background-position: 0 50%; }
        }

        @media (prefers-reduced-motion: reduce) {
            .notice-skeleton-bar {
                animation: none;
            }
        }

        /* 좁은 화면: 부제목과 겹치기 전에 헤더 아래 전체 너비 바로 전환 */
        @media (max-width: 1140px) {
            .notice-panel {
                position: static;
                width: 100%;
                margin: 0 auto 2rem;
            }
        }

        .upload-area {
            border: 1.5px dashed var(--line-strong);
            border-radius: 8px;
            padding: 2rem 1.5rem 0; /* 하단 패딩 제거 */
            text-align: center;
            background-color: var(--paper);
            transition: all 0.3s ease;
            cursor: pointer;
            margin-bottom: 0;
        }
        
        .upload-area:hover {
            border-color: var(--primary);
            background-color: transparent;
        }
        
        .upload-area.dragging {
            border-color: var(--primary);
            background-color: transparent;
            transform: scale(1.02);
        }
        
        .upload-icon {
            width: 64px; /* 배지 지름 축소 */
            height: 64px;
            margin: 0 auto 0.8rem; /* 텍스트를 살짝 위로 */
            background-color: var(--card);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gray-500);
        }

        .upload-icon svg {
            width: 40px; /* 아이콘 크기 확대 */
            height: 40px;
            color: inherit;
        }
        
        .upload-area h3 {
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }
        
        .upload-area p {
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }
        
        .file-input {
            display: none;
        }
        
        
        .file-info {
            display: none;
            background-color: rgba(79, 122, 85, 0.08); /* 연한 초록 배경 */
            border-radius: 8px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            margin-bottom: 0;
            align-items: center;
            gap: 1rem;
            border: 1px solid var(--line);
        }
        
        .file-info.active {
            display: flex;
        }
        
        .file-icon {
            width: 48px;
            height: 48px;
            background-color: transparent; /* 배경 네모 제거 */
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: inherit;
            flex-shrink: 0;
        }

        .file-icon svg {
            width: 40px;
            height: 40px;
            display: block;
            color: var(--ok);
        }
        
        .file-details {
            flex: 1;
            min-width: 0;
        }
        
        .file-name {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
        }
        
        .file-size {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }
        
        .remove-file {
            background-color: var(--error);
            color: var(--white);
            padding: 0.5rem 1rem;
            border-radius: 999px;
            border: none;
            font-weight: 500;
            cursor: pointer;
            transition: opacity 0.3s ease;
            flex-shrink: 0;
        }
        
        .remove-file:hover {
            opacity: 0.9;
        }
        
        .options-section {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            margin-bottom: 0; /* 하단 여백 제거 */
            align-items: end;
        }

        /* 번역 설정 섹션의 내부 여백을 살짝 줄여 전체 공간 압축 */
        .settings-section {
            padding-bottom: 0.5rem;
        }
        
        .option-group {
            background-color: transparent; /* 박스 제거 */
            padding: 0; /* 내부 여백 제거 */
            border-radius: 0;
            border: none; /* 테두리 제거 */
        }
        
        .option-label {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            display: block;
        }
        
        .select-wrapper {
            position: relative;
            margin-top: 0.8rem; /* 선택 박스만 조금 아래로 내림 */
            margin-bottom: 0; /* 아래 여백 축소 */
        }
        
        select {
            width: 100%;
            padding: 0.75rem 1rem; /* 세로로 얇게 */
            border: 1px solid var(--line-strong);
            border-radius: 8px;
            background-color: var(--paper);
            font-size: 1rem;
            color: var(--text-primary);
            cursor: pointer;
            appearance: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            box-shadow: none;
        }
        
        select:hover {
            border-color: var(--primary);
        }
        
        select:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .select-wrapper::after {
            content: "\25BE";
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            color: var(--text-secondary);
            font-size: 0.875rem;
        }

        .translate-button {
            width: 100%;
            background-color: var(--ink);
            color: var(--white);
            padding: 1rem 2rem;
            border-radius: 999px;
            border: none;
            font-size: 18px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .translate-button:hover:not(:disabled) {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: none;
        }
        
        .translate-button:disabled {
            background-color: var(--pill);
            color: var(--ink-faint);
            cursor: not-allowed;
        }
        
        .translate-button:disabled span {
            animation: pulse 1.5s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.6; }
            100% { opacity: 1; }
        }
        
        .progress-section {
            display: none;
            background-color: var(--card);
            border-radius: 4px;
            padding: 1.75rem;
            margin-top: 2rem;
            margin-bottom: 1rem;
            border: none;
            box-shadow: none;
        }

        .progress-section.active {
            display: block;
            animation: progressCardIn 0.3s ease;
        }

        @keyframes progressCardIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .progress-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.375rem;
        }

        .progress-title {
            display: inline-flex;
            align-items: center;
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--text-primary);
        }

        .progress-title-dots {
            display: inline-flex;
            gap: 3px;
            margin-left: 6px;
        }

        .progress-title-dots i {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background-color: var(--secondary);
            animation: progressDot 1.4s infinite ease-in-out;
        }

        .progress-title-dots i:nth-child(2) { animation-delay: 0.2s; }
        .progress-title-dots i:nth-child(3) { animation-delay: 0.4s; }

        @keyframes progressDot {
            0%, 60%, 100% { opacity: 0.25; }
            30% { opacity: 1; }
        }

        .progress-elapsed {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            background-color: var(--gray-100);
            color: var(--text-secondary);
            border-radius: 999px;
            padding: 0.25rem 0.75rem;
            font-size: 0.875rem;
            font-weight: 500;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .progress-status {
            color: var(--text-secondary);
            font-size: 0.9375rem;
            margin-bottom: 1.25rem;
        }

        .progress-bar {
            width: 100%;
            height: 10px;
            background-color: var(--gray-200);
            border-radius: 999px;
            overflow: hidden;
            margin-bottom: 0.875rem;
        }

        .progress-fill {
            position: relative;
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--accent), var(--accent));
            width: 0%;
            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        /* 채움 위를 상시 흐르는 광택 — 값이 멈춰 있어도 살아있음을 표시 */
        .progress-fill::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
            transform: translateX(-100%);
            animation: progressSheen 2.4s infinite;
        }

        @keyframes progressSheen {
            to { transform: translateX(100%); }
        }

        /* 부정형: 실제 %가 없는 구간 — 세그먼트가 좌→우로 흐름 */
        .progress-section.indeterminate .progress-fill {
            width: 32%;
            transition: none;
            animation: progressSlide 1.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
        }

        @keyframes progressSlide {
            0% { margin-left: -32%; }
            100% { margin-left: 100%; }
        }

        /* 완료: 다운로드 배너와 동일한 에메랄드 그린 */
        .progress-section.complete .progress-fill {
            background: linear-gradient(135deg, var(--ok), var(--ok));
            box-shadow: 0 2px 8px rgba(79, 122, 85, 0.3);
        }

        .progress-section.complete .progress-percentage { color: var(--ok); }
        .progress-section.complete .progress-title-dots { display: none; }

        .progress-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            min-height: 1.75rem;
        }

        .progress-pages {
            display: inline-flex;
            align-items: center;
            background-color: var(--gray-100);
            color: var(--secondary);
            border-radius: 999px;
            padding: 0.25rem 0.75rem;
            font-size: 0.875rem;
            font-weight: 500;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .progress-percentage {
            font-size: 1.5rem;
            font-weight: 500;
            color: var(--secondary);
            font-variant-numeric: tabular-nums;
            margin-left: auto;
        }

        .progress-footer {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 0.75rem;
        }

        .progress-hint {
            color: var(--text-muted);
            font-size: 0.8125rem;
            opacity: 0;
            transition: opacity 0.6s ease;
        }

        .progress-hint.visible { opacity: 1; }

        .progress-cancel-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            font-size: 0.8125rem;
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            margin-left: auto;
            flex-shrink: 0;
            transition: color 0.2s ease, background-color 0.2s ease;
        }

        .progress-cancel-btn:not(:disabled):hover {
            color: var(--error);
            background-color: var(--gray-100);
        }

        .progress-cancel-btn:disabled {
            cursor: not-allowed;
            opacity: 0.55;
        }

        @media (prefers-reduced-motion: reduce) {
            .progress-section.active { animation: none; }
            .progress-fill { transition-duration: 0.2s; }
            .progress-fill::after,
            .progress-title-dots i { animation: none; }
            .progress-section.indeterminate .progress-fill {
                width: 100%;
                margin-left: 0;
                animation: pulse 1.5s infinite;
            }
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 0 16px;
            }
            nav {
                width: calc(100% - 32px);
                left: 16px;
                right: 16px;
                top: 16px;
            }
            
            .nav-links {
                gap: 1rem;
            }
            
            .translate-container {
                padding: 0;
                margin: 0 8px 2rem;
                flex-direction: row; /* 태블릿은 데스크톱과 동일한 2열 */
                gap: 1.5rem;
            }

            .pdf-preview-section {
                order: 0;
                width: calc(50% - 1rem);
                flex: 0 0 calc(50% - 1rem);
            }

            .pdf-upload-section {
                order: 0;
                width: calc(50% - 1rem);
                flex: 0 0 calc(50% - 1rem);
            }
            
            .translate-header h1 {
                font-size: 2rem;
            }
            
            .upload-area {
                padding: 2.5rem 1.5rem 0; /* 하단 패딩 제거 */
            }
            
            .options-section {
                grid-template-columns: 1fr;
            }
            
        }
        
        @media (max-width: 480px) {
            .container {
                padding: 0 12px;
            }
            nav {
                width: calc(100% - 24px);
                left: 12px;
                right: 12px;
                top: 12px;
            }
            /* 모바일에서 고정 네비게이션 높이로 인해 상단 제목이 가려지는 현상 보정 */
            .main-content {
                padding: 160px 0 40px 0; /* 더 여유를 줌 */
            }
            
            .translate-container {
                padding: 0;
                margin: 0 0 1.5rem;
                flex-direction: column; /* 모바일은 세로 스크롤 순서 */
            }

            /* 모바일(폰)에서도 각 섹션이 가로폭을 가득 차도록 */
            .pdf-upload-section,
            .pdf-preview-section {
                width: 100%;
                flex: 0 0 100%;
            }

            .pdf-upload-section { order: 1; }
            .pdf-preview-section { order: 2; }
            
            .translate-header h1 {
                font-size: 1.75rem;
            }
            
            .translate-header p {
                font-size: 1rem;
            }
            
            .upload-area {
                padding: 2.5rem 1rem 0; /* 하단 패딩 제거 */
            }
            
            .upload-area h3 {
                font-size: 1.125rem; /* 모바일에서는 조금 더 작게 */
            }
            
            .upload-area p {
                font-size: 0.875rem;
            }
            
            .file-info {
                padding: 1rem;
                flex-direction: column;
                text-align: center;
                gap: 0.75rem;
            }
            
            .file-details {
                text-align: center;
            }
            
            .option-group {
                padding: 1rem;
            }
            
            .progress-section {
                padding: 1.25rem;
            }

            .progress-card-header {
                flex-wrap: wrap;
                gap: 0.5rem;
            }

            .progress-title {
                font-size: 1rem;
            }

            .progress-percentage {
                font-size: 1.25rem;
            }
            
            .nav-links {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .user-info {
                margin-right: 0;
                margin-bottom: 0.5rem;
                max-width: 70vw; /* 모바일에서 더 여유 */
                white-space: normal;
                word-break: break-word;
            }
            
        }
        
        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* 둥둥 떠있는 배지 스타일 */
        .plan-badges {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.75rem;
            margin: 1rem 0rem; /* 배지 아래 여백 절반으로 축소 */
        }

        .plan-badge {
            background: var(--paper);
            backdrop-filter: blur(10px);
            border: 1px solid var(--line-strong);
            border-radius: 999px;
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-primary);
            box-shadow: none;
            transition: all 0.3s ease;
        }

        .floating-badge:nth-child(1) {
            animation: float1 3s ease-in-out infinite;
        }

        .floating-badge:nth-child(2) {
            animation: float2 3.7s ease-in-out infinite;
        }

        .plan-badge:hover {
            transform: translateY(-2px);
            box-shadow: none;
            animation-play-state: paused;
        }

        @keyframes float1 {
            0%, 100% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-4px);
            }
        }

        @keyframes float2 {
            0%, 100% {
                transform: translateY(0px);
            }
            25% {
                transform: translateY(-2px);
            }
            50% {
                transform: translateY(-4px);
            }
            75% {
                transform: translateY(-2px);
            }
        }


        /* 섹션 컨테이너 스타일 */
        .section-container {
            background-color: var(--card);
            border-radius: 4px;
            box-shadow: none;
            padding: 1.5rem 2rem 2rem; /* 상단 패딩을 미리보기 섹션과 동일하게 */
            margin-bottom: 1.5rem;
            border: none;
        }

        /* 번역 설정 섹션의 선택 박스 아래 여백 축소 */
        .section-container.settings-section {
            padding: 1.5rem 2rem 1.5rem; /* 하단 패딩만 줄임 */
        }

        .section-header {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem; /* pdf 미리보기 헤더와 동일 간격 */
            padding-bottom: 0.75rem; /* pdf 미리보기 헤더와 동일 간격 */
            border-bottom: 1px solid var(--border-light);
        }

        .section-icon {
            flex-shrink: 0;
            color: var(--accent);
        }

        .section-title {
            font-size: 1.125rem; /* PDF 미리보기 제목과 동일한 크기 */
            font-weight: 500;
            color: var(--text-primary);
            margin: 0;
        }

        @media (max-width: 480px) {
            .plan-badges {
                gap: 0.5rem;
            }
            
            .plan-badge {
                padding: 0.4rem 0.8rem;
                font-size: 0.8rem;
            }

            .section-container {
                padding: 1.5rem;
            }

            /* 모바일에서도 선택 박스 아래 여백 축소 유지 */
            .section-container.settings-section {
                padding: 1.5rem 1.5rem 1.5rem;
            }

            .section-header {
                margin-bottom: 1rem;
                padding-bottom: 0.75rem;
            }

            .section-title {
                font-size: 1.125rem;
            }
        }

        /* ---------- 알림: 가운데 팝업 ---------- */
        .announcement-overlay {
            position: fixed;
            inset: 0;
            z-index: 3000;
            display: none;
            background: color-mix(in srgb, var(--ink) 35%, transparent);
        }

        .announcement-overlay.show {
            display: block;
            animation: noticeFade 0.2s ease;
        }

        .announcement-modal,
        .banner-content {
            width: min(440px, calc(100vw - 32px));
            max-height: calc(100vh - 48px);
            display: flex;
            flex-direction: column;
            padding: 24px 24px 20px;
            border-radius: 12px;
            background: var(--paper);
            color: var(--ink);
            box-shadow: 0 24px 60px rgba(30, 28, 18, 0.18), 0 0 0 1px var(--line);
        }

        .announcement-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            z-index: 3001;
            display: none;
            transform: translate(-50%, -50%);
        }

        .announcement-modal.show {
            display: flex;
            animation: noticePop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .announcement-badge {
            display: block;
            margin-bottom: 8px;
            font-size: 13px;
            color: var(--ink-faint);
        }

        .announcement-badge.error {
            color: var(--accent-text);
        }

        .announcement-title {
            font-size: 19px;
            font-weight: 500;
            line-height: 1.4;
            letter-spacing: -0.01em;
        }

        .announcement-body {
            margin-top: 8px;
            min-height: 0;
            overflow-y: auto;
            font-size: 14.5px;
            line-height: 1.7;
            color: var(--ink-soft);
            word-break: keep-all;
            overflow-wrap: anywhere;
        }

        .announcement-body a {
            color: var(--accent-text);
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .announcement-detail {
            margin-top: 14px;
            padding: 10px 12px;
            border-radius: 6px;
            background: var(--card);
            font-size: 13.5px;
            line-height: 1.6;
            color: var(--ink-soft);
            white-space: pre-line;
            overflow-wrap: anywhere;
        }

        .announcement-detail:empty {
            display: none;
        }

        .announcement-actions {
            margin-top: 22px;
            display: flex;
            flex-shrink: 0;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 8px;
        }

        .announcement-confirm {
            height: 38px;
            padding: 0 18px;
            border: 0;
            border-radius: 999px;
            background: var(--ink);
            color: var(--bg);
            font: inherit;
            font-size: 14.5px;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .announcement-confirm:hover:not(:disabled) {
            background: color-mix(in srgb, var(--ink), #fff 12%);
        }

        .announcement-confirm.secondary {
            background: var(--pill);
            color: var(--ink);
        }

        .announcement-confirm.secondary:hover:not(:disabled) {
            background: color-mix(in srgb, var(--bg), var(--ink) 10%);
        }

        .announcement-confirm:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .announcement-confirm:focus-visible,
        .toast-close:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        /* 한도 팝업의 요금제 표 */
        .limit-plans {
            width: 100%;
            margin-top: 14px;
            border-collapse: collapse;
            font-size: 13.5px;
        }

        .limit-plans td {
            padding: 7px 0;
            border-top: 1px solid var(--line);
            color: var(--ink-soft);
        }

        .limit-plans td:last-child {
            text-align: right;
            color: var(--ink);
        }

        .limit-plans tr.current td {
            color: var(--accent-text);
        }

        /* 할인 쿠폰 코드 상자 */
        .coupon-code {
            margin-top: 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 6px;
            background: var(--card);
        }

        .coupon-code strong {
            font-size: 20px;
            font-weight: 500;
            letter-spacing: 0.12em;
            color: var(--ink);
            user-select: all;
        }

        .coupon-code span {
            font-size: 13px;
            color: var(--ink-soft);
        }

        /* 번역 완료 팝업 (downloadBanner) */
        .download-banner {
            position: fixed;
            inset: 0;
            z-index: 3000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
            background: color-mix(in srgb, var(--ink) 35%, transparent);
        }

        .download-banner.show {
            display: flex;
            animation: noticeFade 0.2s ease;
        }

        .download-banner.show .banner-content {
            animation: noticePop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .download-status {
            margin-top: 10px;
            font-size: 13.5px;
            line-height: 1.5;
            color: var(--ink-soft);
        }

        .download-status:empty {
            display: none;
        }

        .download-status.error {
            color: var(--accent-text);
        }

        /* ---------- 알림: 모서리 ---------- */
        .toast-stack {
            position: fixed;
            right: 24px;
            bottom: 24px;
            z-index: 3100;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 10px;
            width: min(360px, calc(100vw - 32px));
            pointer-events: none;
        }

        .toast {
            position: relative;
            width: 100%;
            padding: 16px 44px 16px 18px;
            border-radius: 10px;
            background: var(--paper);
            box-shadow: 0 12px 32px rgba(30, 28, 18, 0.14), 0 0 0 1px var(--line);
            pointer-events: auto;
            animation: toastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .toast-eyebrow {
            display: block;
            margin-bottom: 4px;
            font-size: 12.5px;
            color: var(--ink-faint);
        }

        .toast.error .toast-eyebrow {
            color: var(--accent-text);
        }

        .toast-title {
            font-size: 15px;
            font-weight: 500;
            line-height: 1.45;
            color: var(--ink);
        }

        .toast-body {
            margin-top: 4px;
            font-size: 13.5px;
            line-height: 1.6;
            color: var(--ink-soft);
        }

        .toast-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 28px;
            height: 28px;
            border: 0;
            border-radius: 50%;
            background: none;
            color: var(--ink-faint);
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
        }

        .toast-close:hover {
            background: var(--pill);
            color: var(--ink);
        }

        /* ---------- 공지 슬라이드 모달(사진·영상·글 한 틀) ---------- */
        .announcement-modal.notice-slide {
            width: min(640px, calc(100vw - 32px));
            max-height: calc(100vh - 48px);
            padding: 0;
            border-radius: 14px;
            overflow: hidden;
            flex-direction: column;
        }

        /* 사진·영상이 있는 공지는 영상이 잘 보이게 크게 띄운다(화면 높이가 낮으면 16:9가 들어가는 만큼만). */
        .announcement-modal.notice-slide:has(.notice-slide-media:not([hidden])) {
            width: min(960px, calc(100vw - 48px), calc((100vh - 240px) * 16 / 9));
        }

        .announcement-modal.notice-slide:has(.notice-slide-media:not([hidden])) .announcement-title {
            font-size: 21px;
        }

        .announcement-modal.notice-slide:has(.notice-slide-media:not([hidden])) .announcement-body {
            font-size: 15px;
        }

        .notice-slide-close {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 2;
            width: 28px;
            height: 28px;
            border: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.85);
            color: var(--ink-soft);
            font: inherit;
            font-size: 17px;
            line-height: 1;
            cursor: pointer;
            display: grid;
            place-items: center;
            box-shadow: 0 0 0 1px var(--line);
        }

        .notice-slide-close:hover {
            color: var(--ink);
            background: #fff;
        }

        .notice-slide-close:focus-visible,
        .notice-slide-dot:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        .notice-slide-media {
            position: relative;
            flex-shrink: 0;
            aspect-ratio: 16 / 9;
            background: var(--card);
            overflow: hidden;
        }

        .notice-slide-media[hidden],
        .notice-slide .announcement-body[hidden],
        .notice-slide-dots[hidden],
        .notice-slide-actions [hidden] {
            display: none;
        }

        .notice-slide-media img,
        .notice-slide-media video {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            animation: noticeFade 0.3s ease;
        }

        .notice-slide-body {
            display: flex;
            flex-direction: column;
            min-height: 0;
            padding: 20px 22px 18px;
        }

        /* 미디어가 없는 글 공지는 오른쪽 위 닫기 단추와 겹치지 않게 머리말 줄을 비운다 */
        .notice-slide-media[hidden] + .notice-slide-body {
            padding-right: 48px;
        }

        .notice-slide-kicker {
            margin-bottom: 6px;
            font-size: 12.5px;
            color: var(--accent-text);
        }

        .notice-slide .announcement-title {
            font-size: 19px;
            font-weight: 600;
        }

        /* 장마다 글 길이가 달라도 창 높이가 덜 흔들리게 두 줄 높이는 남겨 둔다 */
        .notice-slide .announcement-body {
            min-height: 46px;
            font-size: 14px;
            line-height: 1.65;
        }

        .notice-slide .announcement-body p + p,
        .notice-slide .announcement-body p + ul,
        .notice-slide .announcement-body ul + p {
            margin-top: 8px;
        }

        .notice-slide .announcement-body ul,
        .notice-slide .announcement-body ol {
            padding-left: 1.3em;
        }

        .notice-slide-foot {
            display: flex;
            flex-shrink: 0;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 18px;
        }

        .notice-slide-dots {
            display: flex;
            gap: 5px;
        }

        .notice-slide-dot {
            width: 7px;
            height: 7px;
            padding: 0;
            border: 0;
            border-radius: 4px;
            background: var(--line-strong);
            cursor: pointer;
            transition: width 0.2s ease, background 0.2s ease;
        }

        .notice-slide-dot.on {
            width: 20px;
            background: var(--ink);
        }

        .notice-slide-actions {
            display: flex;
            gap: 6px;
            margin-left: auto;
        }

        .announcement-confirm.ghost {
            background: none;
            color: var(--ink-soft);
        }

        .announcement-confirm.ghost:hover:not(:disabled) {
            background: var(--pill);
            color: var(--ink);
        }

        /* 휴대폰: 화면 가운데 카드(양옆 16px). 사진·영상 공지도 같은 폭으로 둔다
           (사진·영상 공지의 넓은 폭 규칙이 더 강해 같이 적어 덮는다). 길면 본문만 카드 안에서 스크롤된다. */
        @media (max-width: 600px) {
            .announcement-modal.notice-slide,
            .announcement-modal.notice-slide:has(.notice-slide-media:not([hidden])) {
                width: calc(100vw - 32px);
                max-height: calc(100vh - 32px);
                max-height: calc(100dvh - 32px);
            }
        }

        @keyframes noticeFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes noticePop {
            from { opacity: 0; scale: 0.97; }
            to { opacity: 1; scale: 1; }
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: none; }
        }

        @media (max-width: 600px) {
            .toast-stack {
                right: 16px;
                bottom: 16px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .announcement-overlay.show,
            .announcement-modal.show,
            .notice-slide-media img,
            .notice-slide-media video,
            .download-banner.show,
            .download-banner.show .banner-content,
            .toast {
                animation: none;
            }

            .notice-slide-dot {
                transition: none;
            }
        }

        /* 업로드 영역의 할인 쿠폰 버튼 */
        .discount-button {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            height: 28px;
            padding: 0 12px;
            border: 0;
            border-radius: 999px;
            background: var(--accent-tint);
            color: var(--accent-ink);
            font: inherit;
            font-size: 12.5px;
            white-space: nowrap;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .discount-button:hover {
            background: color-mix(in srgb, var(--accent-tint), var(--accent) 12%);
        }

        /* 레이아웃 번역 선택: 체크하면 언어·모델 칸이 아래에 펼쳐진다 */
        .layout-choice {
            display: flex;
            gap: 0.75rem;
            align-items: flex-start;
            cursor: pointer;
        }

        .layout-choice input {
            flex: none;
            width: 1.15rem;
            height: 1.15rem;
            margin: 0.15rem 0 0;
            accent-color: var(--accent);
            cursor: pointer;
        }

        .layout-choice-text {
            display: grid;
            gap: 0.3rem;
            min-width: 0;
        }

        .layout-choice-text strong {
            font-size: 1rem;
            font-weight: 600;
            color: var(--ink);
        }

        .layout-choice-caption {
            font-size: 0.85rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .layout-choice input:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        .layout-options {
            margin-top: 1.25rem;
            padding-top: 1.25rem;
            border-top: 1px solid var(--line);
        }
