/* LunoBar Website Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --bg-primary: #2d2d2d;
    --bg-secondary: #252525;
    --bg-tertiary: #1f1f1f;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    position: relative;
    height: 100%;
    /* 페이지별 스크롤바 유무 차이로 레이아웃이 좌/우로 흔들리는 현상 방지 */
    scrollbar-gutter: stable;
    overflow-y: scroll; /* 구형 브라우저 fallback */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Launcher Bar - 고정 위치로 오른쪽 끝에 배치 */
.launcher-bar-container {
    position: fixed;
    top: 72px; /* 네비게이션 바 높이 */
    /* ✅ Windows/Chrome에서 스크롤바가 콘텐츠 위에 오버레이로 뜨는 경우가 있어,
       right:0에 붙이면 런처바가 "가려진 것처럼" 보일 수 있음.
       약간 안쪽으로 오프셋을 둬서 항상 안전하게 보이도록 한다. */
    right: var(--launcher-edge-offset, 0px);
    width: 60px;
    height: calc(100vh - 72px);
    z-index: 998;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease; /* 표시/숨김 애니메이션 */
    transform: translateX(0);
    opacity: 1;
}

/* 런처 바 숨김 상태 */
.launcher-bar-container.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.launcher-bar-container.position-left {
    right: auto;
    left: var(--launcher-edge-offset, 0px);
}

.launcher-bar-container.position-left.hidden {
    transform: translateX(-100%);
}

.launcher-bar-container.position-top {
    position: fixed !important;
    top: 72px;
    right: 0;
    left: 0;
    width: 100% !important;
    height: 60px;
}

.launcher-bar {
    width: 60px;
    background: transparent;
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;
    transition: all 0.3s ease;
}

.launcher-bar-container.position-top .launcher-bar {
    width: 100%;
    height: 60px;
    flex-direction: row;
}

.launcher-bar-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden; /* 접기/펼치기 시 max-height 애니메이션용 */
}

.launcher-bar-container.position-top .launcher-bar-buttons {
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.launcher-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    /* 접기/펼치기 순차 애니메이션 */
    opacity: 1;
    transform: translateY(0);
    transition-property: opacity, transform;
    transition-duration: 220ms;
    transition-timing-function: cubic-bezier(0.2, 0.9, 0.2, 1);
    transition-delay: var(--delay-in, 0ms);
}

.launcher-toggle-item {
    /* 토글 버튼은 항상 표시/고정 */
    opacity: 1 !important;
    transform: none !important;
}

.launcher-bar-container.is-collapsed .launcher-bar-buttons .launcher-item:not(.launcher-toggle-item) {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
    transition-delay: var(--delay-out, 0ms);
}

.launcher-bar-container.position-top .launcher-item {
    width: auto;
    height: 100%;
}

.launcher-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 4px;
    position: relative;
    margin: 2px 0;
}

.separator-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

.launcher-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: auto;
    position: relative;
    margin: 4px 0;
    /* button 요소로 써도 동일하게 보이도록 리셋 */
    padding: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.launcher-bar-container.position-top .launcher-button {
    margin: 0 4px;
}

.launcher-button:hover {
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.launcher-button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    /* 아이콘이 테두리 기준으로 미세하게 우측으로 치우쳐 보이는 현상 보정 */
    transform: translateX(-1px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(31, 31, 31, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(31, 31, 31, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    padding-right: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links button {
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-links .btn-purchase {
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

.btn-download-nav {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download-nav:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-login {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-contact {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* 문의 모달: textarea 높이만 살짝 보정 */
.contact-textarea {
    min-height: 140px;
    resize: vertical;
}

/* 문의 textarea를 input과 동일 톤으로 */
.auth-form textarea.contact-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: all 0.2s ease;
}

.auth-form textarea.contact-textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.contact-attach-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --------------------------
   Patch Notes
-------------------------- */
.patchnotes-page {
    /* navbar(고정, 72px) 아래로 본문이 겹치지 않게 상단 여백을 넉넉히 확보 */
    padding: 110px 0 64px;
    min-height: calc(100vh - 120px);
}

.patchnotes-header {
    margin-bottom: 22px;
}

.patchnotes-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.patchnotes-filters {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.patchnotes-filter-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.15s ease;
}

.patchnotes-filter-btn:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: var(--text-primary);
}

.patchnotes-filter-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.65);
    color: var(--text-primary);
}

.patchnotes-adminbar {
    display: flex;
    justify-content: flex-end;
}

.patchnotes-create-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 0;
}

/* 패치노트 작성/댓글 작성 버튼은 로그인/가입 CTA처럼 "크게" 보일 필요가 없으므로, 해당 섹션에서만 컴팩트하게 */
.patchnotes-form-row .btn-submit,
.patchnote-comment-row .btn-submit {
    width: auto;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 0;
    /* textarea 높이에 끌려가서 세로로 늘어나는 문제 방지 */
    height: 40px;
    line-height: 1;
    align-self: flex-start;
}

.patchnote-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    margin-right: 10px;
}

.patchnote-badge.badge-notice {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: rgba(253, 230, 138, 0.95);
}

.patchnote-badge.badge-update {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: rgba(199, 210, 254, 0.95);
}

.patchnote-mini {
    font-size: 12px;
    color: var(--text-tertiary);
}

.patchnote-attach-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.patchnote-attach-list {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.patchnote-attach-item {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.patchnote-images {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.patchnote-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.25);
}

.patchnotes-title {
    font-size: 40px;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}

.patchnotes-subtitle {
    margin: 0;
    color: var(--text-secondary);
}

.patchnotes-admin {
    margin: 22px 0 26px;
}

.patchnotes-admin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.patchnotes-admin-title {
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.patchnotes-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.patchnotes-textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
}

.patchnotes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.patchnotes-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.patchnotes-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    user-select: none;
}

.patchnotes-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.patchnotes-empty {
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
}

.patchnote-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.patchnote-card:hover {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: var(--shadow-sm);
}

.patchnote-card:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.75);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.patchnote-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.patchnote-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.patchnote-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.patchnote-snippet {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.patchnote-actions {
    display: flex;
    justify-content: flex-end;
}

.patchnote-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.patchnote-content {
    line-height: 1.75;
    white-space: normal;
    word-break: break-word;
}

/* Patch Note Detail Page */
.patchnote-page {
    /* navbar(고정, 72px) 아래 여백 */
    padding: 110px 0 64px;
    min-height: calc(100vh - 120px);
}

.patchnote-backrow {
    margin-bottom: 14px;
}

.patchnote-backlink {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
}

.patchnote-backlink:hover {
    color: var(--text-primary);
}

.patchnote-view {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.patchnote-view-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.patchnote-view-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.patchnote-view-meta {
    color: var(--text-tertiary);
    font-size: 13px;
}

.patchnote-view-body {
    margin-top: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.patchnote-view-images {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.patchnote-view-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.patchnote-stats {
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 700;
}

#pnLikeBtn.liked {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.10);
    color: rgba(254, 202, 202, 0.95);
}

#pnLikeBtn.pulse {
    animation: likePulse 220ms ease-out;
}

@keyframes likePulse {
    0% { transform: scale(1); }
    60% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.patchnote-admin-actions {
    margin-left: auto;
}

.account-secondary-btn.danger {
    border-color: rgba(239, 68, 68, 0.45);
    color: rgba(254, 202, 202, 0.95);
}

.account-secondary-btn.danger:hover {
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.10);
}

/* 신뢰 기기 목록 */
.access-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.access-history-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.access-history-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.access-history-title {
    font-weight: 600;
    color: var(--text);
}

.access-history-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.access-history-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.access-history-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: rgba(226, 232, 240, 0.95);
}

.account-kv-value-with-action {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 접속 기록 모달은 내용이 길 수 있어 넓게 */
#accessHistoryModal .modal-content {
    max-width: 780px;
    width: min(92vw, 780px);
}

.patchnote-comments {
    margin-top: 18px;
}

.patchnote-comments-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.patchnote-comments-list {
    display: grid;
    gap: 8px;
}

.patchnote-comment {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
}

.patchnote-comment-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.patchnote-comment-authorwrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    --auth-glow: 0.14;
    --auth-glow-hover: 0.18;
    --auth-sat: 1.0;
    --auth-dot: #22c55e;
    --auth-dot-glow: 0.30;
}

/* 댓글 작성자 등급(1~10/admin)별 글로우 - 상단바 로그인과 동일 컨셉 */
.patchnote-comment-authorwrap[data-grade-level="1"] { --auth-glow: 0.10; --auth-glow-hover: 0.14; --auth-sat: 1.00; --auth-dot-glow: 0.22; }
.patchnote-comment-authorwrap[data-grade-level="2"] { --auth-glow: 0.12; --auth-glow-hover: 0.16; --auth-sat: 1.02; --auth-dot-glow: 0.24; }
.patchnote-comment-authorwrap[data-grade-level="3"] { --auth-glow: 0.14; --auth-glow-hover: 0.18; --auth-sat: 1.04; --auth-dot-glow: 0.26; }
.patchnote-comment-authorwrap[data-grade-level="4"] { --auth-glow: 0.16; --auth-glow-hover: 0.20; --auth-sat: 1.06; --auth-dot-glow: 0.28; }
.patchnote-comment-authorwrap[data-grade-level="5"] { --auth-glow: 0.18; --auth-glow-hover: 0.22; --auth-sat: 1.08; --auth-dot-glow: 0.30; }
.patchnote-comment-authorwrap[data-grade-level="6"] { --auth-glow: 0.20; --auth-glow-hover: 0.25; --auth-sat: 1.10; --auth-dot-glow: 0.33; }
.patchnote-comment-authorwrap[data-grade-level="7"] { --auth-glow: 0.23; --auth-glow-hover: 0.28; --auth-sat: 1.12; --auth-dot-glow: 0.36; }
.patchnote-comment-authorwrap[data-grade-level="8"] { --auth-glow: 0.26; --auth-glow-hover: 0.32; --auth-sat: 1.14; --auth-dot: #60a5fa; --auth-dot-glow: 0.40; }
.patchnote-comment-authorwrap[data-grade-level="9"] { --auth-glow: 0.30; --auth-glow-hover: 0.36; --auth-sat: 1.16; --auth-dot: #f59e0b; --auth-dot-glow: 0.48; }
.patchnote-comment-authorwrap[data-grade-level="10"] { --auth-glow: 0.34; --auth-glow-hover: 0.42; --auth-sat: 1.20; --auth-dot: #fbbf24; --auth-dot-glow: 0.58; }
.patchnote-comment-authorwrap[data-grade-level="admin"] { --auth-glow: 0.50; --auth-glow-hover: 0.60; --auth-sat: 1.25; --auth-dot: #ef4444; --auth-dot-glow: 0.70; }

.patchnote-comment-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.patchnote-comment-author {
    font-weight: 900;
    color: var(--text-primary);
    font-size: 13px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patchnote-comment-grade {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.25px;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.10) inset,
        0 8px 24px rgba(124, 58, 237, var(--auth-glow, 0.16));
    filter: saturate(var(--auth-sat, 1));
    white-space: nowrap;
}

.patchnote-comment-meta {
    color: var(--text-tertiary);
    font-size: 12px;
}

.patchnote-comment-body {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.patchnote-comment-body.is-deleted {
    color: var(--text-tertiary);
    font-style: italic;
}

.pn-comment-del-btn {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.pn-comment-reply-btn {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.patchnote-thread {
    display: grid;
    gap: 6px;
}

.patchnote-replies {
    margin-left: 14px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 6px;
}

.patchnote-comment.is-reply {
    background: rgba(255, 255, 255, 0.03);
}

.patchnote-replybox {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.patchnote-reply-input {
    width: 100%;
    min-height: 56px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.patchnote-reply-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.10);
}

.patchnote-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.patchnote-reply-actions .btn-submit {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
    width: auto;
    height: 34px;
    line-height: 1;
}

/* 대댓글 취소/등록 높이 맞춤 */
.patchnote-reply-actions .account-secondary-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
    width: auto;
    height: 34px;
    line-height: 1;
}

.patchnote-comment-form {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.patchnote-comment-input {
    width: 100%;
    min-height: 64px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
}

.patchnote-comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.patchnote-comment-row {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start; /* ✅ 버튼 stretch 방지 */
    gap: 10px;
}

.patchnote-comment-row .patchnote-comment-input {
    flex: 1;
}

.patchnote-loading {
    color: var(--text-secondary);
    padding: 18px 0;
}

.patchnote-error {
    color: rgba(248, 113, 113, 0.95);
    padding: 18px 0;
    font-weight: 800;
}

.patchnote-empty {
    color: var(--text-tertiary);
    padding: 10px 0;
}

.contact-attach-list {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.contact-attach-item {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.contact-attach-item .muted {
    color: var(--text-tertiary);
    font-size: 12px;
    white-space: nowrap;
}

/* 닉네임 + 등급 배지 */
.btn-login .login-name {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-login .login-grade {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset;
    white-space: nowrap;
}

/* 등급 단계 컬러를 배지에도 반영 */
.account-menu.authenticated.auth-verified[data-grade-level] .btn-login .login-grade {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.10) inset,
        0 10px 24px rgba(0,0,0,0.12);
}

/* Account Menu (로그인 상태 UI) */
.account-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.account-menu.authenticated .btn-login {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
}

/* 로그인됨(인증 확정) - 눈에 띄는 강조 */
.account-menu.authenticated.auth-verified .btn-login {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        var(--gradient-primary) border-box;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 8px 24px rgba(124, 58, 237, var(--auth-glow, 0.18));
    color: var(--text-primary);
    filter: saturate(var(--auth-sat, 1));
}

.account-menu.authenticated.auth-verified .btn-login::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--auth-dot, #22c55e); /* online */
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.9), 0 0 16px rgba(34, 197, 94, var(--auth-dot-glow, 0.35));
}

.account-menu.authenticated.auth-verified .btn-login:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 14px 36px rgba(124, 58, 237, var(--auth-glow-hover, 0.22));
}

/* 로그인 직후 1회 '팝' 애니메이션 */
.account-menu.just-authed .btn-login {
    animation: lunobarLoginPop 700ms cubic-bezier(.2,.8,.2,1);
}

@keyframes lunobarLoginPop {
    0% { transform: translateY(0) scale(1); filter: saturate(1); }
    35% { transform: translateY(-1px) scale(1.04); filter: saturate(1.15); }
    100% { transform: translateY(0) scale(1); filter: saturate(1); }
}

@media (prefers-reduced-motion: reduce) {
    .account-menu.just-authed .btn-login { animation: none; }
}

/* 등급(1~10)별 화려함 단계: data-grade-level 값으로 자동 적용 */
.account-menu.authenticated.auth-verified { --auth-glow: 0.14; --auth-glow-hover: 0.18; --auth-sat: 1.0; --auth-dot: #22c55e; --auth-dot-glow: 0.30; }
.account-menu.authenticated.auth-verified[data-grade-level="1"] { --auth-glow: 0.10; --auth-glow-hover: 0.14; --auth-sat: 1.00; --auth-dot-glow: 0.22; }
.account-menu.authenticated.auth-verified[data-grade-level="2"] { --auth-glow: 0.12; --auth-glow-hover: 0.16; --auth-sat: 1.02; --auth-dot-glow: 0.24; }
.account-menu.authenticated.auth-verified[data-grade-level="3"] { --auth-glow: 0.14; --auth-glow-hover: 0.18; --auth-sat: 1.04; --auth-dot-glow: 0.26; }
.account-menu.authenticated.auth-verified[data-grade-level="4"] { --auth-glow: 0.16; --auth-glow-hover: 0.20; --auth-sat: 1.06; --auth-dot-glow: 0.28; }
.account-menu.authenticated.auth-verified[data-grade-level="5"] { --auth-glow: 0.18; --auth-glow-hover: 0.22; --auth-sat: 1.08; --auth-dot-glow: 0.30; }
.account-menu.authenticated.auth-verified[data-grade-level="6"] { --auth-glow: 0.20; --auth-glow-hover: 0.25; --auth-sat: 1.10; --auth-dot-glow: 0.33; }
.account-menu.authenticated.auth-verified[data-grade-level="7"] { --auth-glow: 0.23; --auth-glow-hover: 0.28; --auth-sat: 1.12; --auth-dot-glow: 0.36; }
.account-menu.authenticated.auth-verified[data-grade-level="8"] { --auth-glow: 0.26; --auth-glow-hover: 0.32; --auth-sat: 1.14; --auth-dot: #60a5fa; --auth-dot-glow: 0.40; }
.account-menu.authenticated.auth-verified[data-grade-level="9"] { --auth-glow: 0.30; --auth-glow-hover: 0.36; --auth-sat: 1.16; --auth-dot: #f59e0b; --auth-dot-glow: 0.48; }
.account-menu.authenticated.auth-verified[data-grade-level="10"] { --auth-glow: 0.34; --auth-glow-hover: 0.42; --auth-sat: 1.20; --auth-dot: #fbbf24; --auth-dot-glow: 0.58; }

/* admin은 별도(훨씬 강하게) */
.account-menu.authenticated.auth-verified[data-grade-level="admin"] { --auth-glow: 0.50; --auth-glow-hover: 0.60; --auth-sat: 1.25; --auth-dot: #ef4444; --auth-dot-glow: 0.70; }

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    z-index: 2000;
    display: none;
}

.account-menu.open .account-dropdown {
    display: block;
}

.account-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 2px 8px;
}

.account-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.2;
}

.account-email {
    font-size: 13px;
    color: var(--text-tertiary);
    word-break: break-all;
}

.account-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

.account-dropdown-item {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-dropdown-item + .account-dropdown-item {
    margin-top: 10px;
}

.account-dropdown-item:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
}


.btn-purchase {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

.btn-purchase:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    opacity: 0.9 !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* 모달 애니메이션은 transition으로 처리하므로 keyframes 제거 */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 0 24px 24px;
}

/* Account: token usage divider (between lists) */
.token-usage-divider {
    height: 1px;
    margin: 14px 0;
    background: rgba(255, 255, 255, 0.10);
}

/* Account: refund button in payment history */
.token-refund-btn {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.token-refund-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.28);
}

.token-refund-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Purchase confirm modal: top toast message */
.purchase-modal-toast {
    display: none;
    margin: 14px 24px 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(236, 72, 153, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1.45;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.purchase-modal-toast.active {
    display: block;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 72px);
    padding: 80px 0;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
}

.auth-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

/* -------------------------- */
/* Account Page (내 정보)     */
/* -------------------------- */
.account-page {
    padding-top: 72px; /* navbar height */
    min-height: 100vh;
    background: var(--bg-primary);
}

/* --------------------------
   Admin page (reuse account styles)
-------------------------- */
.admin-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 240px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    padding: 0 12px;
}

.admin-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.admin-table th,
.admin-table td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    vertical-align: top;
}

.admin-table th {
    position: sticky;
    top: 0;
    background: rgba(31,31,31,0.92);
    backdrop-filter: blur(10px);
    text-align: left;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.admin-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.admin-input {
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    padding: 0 10px;
    width: 100%;
}

.admin-suspend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-suspend-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-muted {
    font-size: 12px;
    color: var(--text-tertiary);
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.account-hero {
    padding: 28px 0 18px;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(1200px 600px at 20% -10%, rgba(99,102,241,0.18), transparent 55%),
                radial-gradient(900px 500px at 80% 0%, rgba(236,72,153,0.12), transparent 50%);
}

.account-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.account-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.account-subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.account-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-link {
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 13px;
}

.account-link:hover {
    border-color: rgba(255,255,255,0.22);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.account-section {
    padding: 28px 0 72px;
}

.account-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 28px 0;
}

.account-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
}

.account-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 18px;
}

.account-card-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 16px;
}

.account-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-card-title-row .account-card-title {
    margin: 0;
}

.account-card-desc {
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.account-profile-card .account-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.account-profile-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.account-profile-meta {
    min-width: 0;
}

.account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(236,72,153,0.25));
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(255,255,255,0.92);
    overflow: hidden;
    position: relative;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.account-avatar.has-image img {
    display: block;
}

.account-avatar.has-image #accountAvatarText {
    display: none;
}

.account-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
    min-width: 170px;
}

.account-avatar-hint {
    margin: 0;
    text-align: right;
}

.account-secondary-btn {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.account-secondary-btn:hover {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255, 255, 255, 0.06);
}

.account-secondary-btn.danger {
    border-color: rgba(239, 68, 68, 0.35);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(239, 68, 68, 0.10);
}

.account-secondary-btn.danger:hover {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.16);
}

.account-profile-name {
    font-weight: 900;
    font-size: 16px;
    line-height: 1.1;
}

.account-profile-email {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-tertiary);
    word-break: break-all;
}

.account-kv {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-kv-key {
    color: var(--text-tertiary);
    font-size: 13px;
}

.account-kv-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.account-form {
    margin-top: 14px;
}

.account-input-with-action {
    position: relative;
    display: flex;
    align-items: center;
}

.account-input-with-action input {
    padding-right: 48px;
}

.account-input-with-action .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-note-title {
    font-weight: 800;
    font-size: 14px;
}

.account-note-list {
    margin-top: 10px;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* -------------------------- */
/* Token ring (Account)       */
/* -------------------------- */
.token-card {
    margin-top: 18px;
}

.token-layout {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: start;
}

.token-layout-left {
    display: flex;
    justify-content: center;
}

.token-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 160px;
    height: 160px;
}

.token-layout-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-usage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.token-usage-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.token-usage-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.token-usage-actions {
    display: flex;
    gap: 8px;
}

.token-usage-period {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.token-usage-period option {
    /* Windows/Chrome: 드롭다운 옵션 배경이 흰색(시스템)인데
       select에 color:white를 주면 옵션 텍스트가 안 보이는 문제가 있어 안전하게 보정 */
    background: #ffffff;
    color: #111111;
}

.token-usage-period:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.55);
}

.token-usage-period:disabled {
    opacity: 0.6;
}

.token-usage-loading,
.token-usage-empty {
    font-size: 13px;
    color: var(--text-secondary);
}

.token-usage-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-usage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.token-usage-item-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.token-usage-item-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-usage-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.token-usage-tag {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
}

.token-usage-balance {
    min-width: 0;
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-usage-item-right {
    flex: 0 0 auto;
}

.token-usage-item-amount {
    font-size: 13px;
    font-weight: 800;
    color: #fca5a5; /* red-300 */
}

.token-usage-item-amount.is-credit {
    color: #86efac; /* green-300 */
}

.account-note-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.account-card-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.token-ring {
    width: 160px;
    height: 160px;
    transform: rotate(-90deg);
}

.token-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.10);
    stroke-width: 10;
}

.token-ring-fg {
    fill: none;
    stroke: url(#tokenRingGrad);
    stroke-width: 10;
    stroke-linecap: round;
    /* r=46 => circumference ≈ 289 */
    stroke-dasharray: 289;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.45));
    transition: opacity 0.25s ease;
}

.token-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.token-value {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.token-label {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.token-visual.is-empty .token-ring-fg {
    opacity: 0.35;
}

@media (max-width: 960px) {
    .token-layout {
        grid-template-columns: 1fr;
    }
    .token-layout-left {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
    .account-profile-card .account-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    .account-profile-actions {
        align-items: stretch;
        min-width: 0;
    }
    .account-avatar-hint {
        text-align: left;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* ✅ select/textarea도 input과 동일 톤으로 통일 (창작마당 업로드/설명 흰배경 문제 해결) */
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.78) 50%),
                      linear-gradient(135deg, rgba(255,255,255,0.78) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px),
                         calc(100% - 13px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

/* 비밀번호 입력 래퍼 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    padding-right: 48px;
    width: 100%;
}

/* 브라우저 기본 비밀번호 보기/숨기기 버튼 숨기기 */
.password-input-wrapper input[type="password"]::-ms-reveal,
.password-input-wrapper input[type="password"]::-ms-clear {
    display: none;
}

.password-input-wrapper input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    right: -9999px !important;
}

/* Edge (Chromium) 기본 비밀번호 버튼 숨기기 */
.password-input-wrapper input[type="password"]::-webkit-inner-spin-button,
.password-input-wrapper input[type="password"]::-webkit-outer-spin-button {
    display: none;
}

/* 모든 브라우저에서 기본 비밀번호 토글 버튼 완전히 숨기기 */
.password-input-wrapper input[type="password"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle:active {
    opacity: 0.5;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
}

.password-toggle.hidden svg {
    display: none;
}

/* 숨김 아이콘 (눈에 X 표시) */
.password-toggle .icon-hidden {
    display: none;
}

.password-toggle.active .icon-visible {
    display: none;
}

.password-toggle.active .icon-hidden {
    display: block;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="password"]::placeholder {
    color: var(--text-tertiary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 이메일 입력 래퍼 */
.email-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-input-wrapper input[type="email"] {
    flex: 1;
}

.btn-verify-email {
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-verify-email:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-verify-email:active {
    transform: translateY(0);
}

.btn-verify-email:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 이메일 인증 영역 */
.email-verification-area {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, max-height 0.3s ease-out, margin-top 0.3s ease-out;
}

.email-verification-area.showing {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
}

.email-verification-area label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.verification-code-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.verification-code-wrapper input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

.verification-code-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.verification-code-wrapper input::placeholder {
    letter-spacing: 2px;
    font-size: 14px;
}

.verification-timer {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.verification-timer.warning {
    color: #ef4444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label span {
    user-select: none;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-light);
}

.btn-submit {
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.form-divider span {
    padding: 0 16px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-footer a,
.link-signup,
.link-login,
.link-terms {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.form-footer a:hover,
.link-signup:hover,
.link-login:hover,
.link-terms:hover {
    color: var(--primary-light);
}

/* Form Error States */
.form-group.error input {
    border-color: #ef4444;
}

.form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.form-success {
    color: #10b981;
    font-size: 12px;
    margin-top: 4px;
}

/* 상단 알림 박스 */
.notification-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(12px);
}

.notification-toast.success {
    background: rgba(16, 185, 129, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
}

.notification-toast.error {
    background: rgba(239, 68, 68, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: white;
}

.notification-toast.info {
    background: rgba(59, 130, 246, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
}

.notification-toast .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.notification-toast .message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.notification-toast .close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.notification-toast .close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification-toast.hiding {
    animation: slideUpToast 0.3s ease-out forwards;
}

@keyframes slideUpToast {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Hero Section */
.hero {
    padding: 160px 0 120px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    margin-bottom: 24px;
}

.badge-text {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* aria-disabled: keep clickable but visually disabled (used in purchase modal) */
.btn-primary[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary[aria-disabled="true"]:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    padding: 16px 32px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-tertiary);
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.visual-container {
    position: relative;
    transform: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}

.mockup-window {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Luno Assistant Window Styles */
.mockup-window.lunobar-assistant {
    background: #2d2d2d;
    border: none;
    width: 100%;
    max-width: 600px;
    height: 500px;
    display: flex;
    flex-direction: column;
    order: 1;
    flex: 0 0 auto;
}

.mockup-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1f1f1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 40px;
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.luno-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.luno-icon img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.title-bar-text {
    font-size: 13px;
    font-weight: 500;
    color: white;
}

.title-bar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-control {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.window-control.minimize::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
}

.window-control.maximize::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
}

.window-control.close::before {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1;
}

.window-control:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mockup-tab-area {
    background: #252525;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 12px;
    height: 36px;
    display: flex;
    align-items: flex-end;
}

.tab-item {
    position: relative;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tab-item.active {
    color: white;
}

.tab-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tab-item.active .tab-underline {
    opacity: 1;
}

.mockup-content-area {
    flex: 1;
    background: #2d2d2d;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 스크롤바 스타일링 */
.mockup-content-area::-webkit-scrollbar {
    width: 6px;
}

.mockup-content-area::-webkit-scrollbar-track {
    background: transparent;
}

.mockup-content-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.mockup-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    animation: messageSlideIn 0.4s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.chat-message.user-message {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant-message {
    align-self: flex-start;
    background: #353535;
    color: white;
    border-bottom-left-radius: 4px;
}

/* 일관된 대화 패턴: 사용자 질문 -> 타이핑 -> 답변 -> 사용자 질문 -> 타이핑 -> 답변 */

/* 첫 번째 대화 턴 */
.chat-message:nth-child(1) {
    /* 사용자 질문 1 */
    animation-delay: 0.3s;
}

.chat-message:nth-child(2) {
    /* 타이핑 시작 - 질문 후 0.5초 */
    animation-delay: 0.8s;
}

.chat-message:nth-child(3) {
    /* 첫 번째 답변 - 타이핑 1.5초 후 (2.3s) */
    animation-delay: 2.3s;
}

.chat-message:nth-child(4) {
    /* 두 번째 답변 - 첫 답변 후 0.3초 */
    animation-delay: 2.6s;
}

/* 두 번째 대화 턴 */
.chat-message:nth-child(5) {
    /* 사용자 질문 2 - 답변 후 1.5초 (읽는 시간) */
    animation-delay: 4.1s;
}

.chat-message:nth-child(6) {
    /* 타이핑 시작 - 질문 후 0.5초 */
    animation-delay: 4.6s;
}

.chat-message:nth-child(7) {
    /* 최종 답변 - 타이핑 1.5초 후 (6.1s) */
    animation-delay: 6.1s;
}

.chat-message.typing {
    background: #353535;
    padding: 12px 14px;
    opacity: 0;
}

/* 첫 번째 타이핑: 0.8s 시작, 1.5초 표시, 2.3s 종료 */
.chat-message.typing:nth-child(2) {
    animation: typingShow 0.2s ease-out 0.8s forwards, typingFadeOut 0.3s ease-out 2.3s forwards;
}

/* 두 번째 타이핑: 4.6s 시작, 1.5초 표시, 6.1s 종료 */
.chat-message.typing:nth-child(6) {
    animation: typingShow 0.2s ease-out 4.6s forwards, typingFadeOut 0.3s ease-out 6.1s forwards;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

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

.chat-message {
    animation-duration: 0.5s;
}

.chat-message.user-message {
    animation-duration: 0.4s;
}

.chat-message.assistant-message {
    animation-duration: 0.5s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes typingShow {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes typingFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-5px);
    }
}

.mockup-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #1f1f1f;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-field {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    background: #2d2d2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-field:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.send-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    height: 40px;
}

.send-button:hover {
    background: #2563eb;
}

.send-button svg {
    width: 16px;
    height: 16px;
}

.folder-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d2d2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-button:hover {
    background: #353535;
    border-color: rgba(255, 255, 255, 0.2);
}

.folder-button svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Features Section */
.features {
    padding: 120px 0;
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 20px;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    /* connector sizing (grid gap과 동일) */
    --feature-gap: 32px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative; /* connector pseudo elements */
}

/* Feature card corner badge (top-right) */
.feature-corner-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(129, 140, 248, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.28);
    backdrop-filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Luno Assistant ↔ 파일 생성 및 수정: 연결감(라인 + 체인) */
@media (min-width: 961px) {
    .feature-card.feature-link-from::after {
        content: '';
        position: absolute;
        top: 50%;
        right: calc(-1 * var(--feature-gap));
        width: var(--feature-gap);
        height: 2px;
        transform: translateY(-50%);
        border-radius: 999px;
        background: rgba(129, 140, 248, 0.28); /* --primary-light 계열 */
        pointer-events: none;
    }

    .feature-card.feature-link-from::before {
        content: '';
        position: absolute;
        top: 50%;
        /* gap 중앙에 체인 아이콘을 위치 */
        right: calc(-1 * (var(--feature-gap) / 2 + 9px));
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        pointer-events: none;
        opacity: 0.92;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 18px 18px;
        /* inline SVG (stroke = --primary-light 계열) */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 1 0-7l1.5-1.5a5 5 0 0 1 7 7L17 13'/%3E%3Cpath d='M14 11a5 5 0 0 1 0 7L12.5 19.5a5 5 0 0 1-7-7L7 11'/%3E%3C/svg%3E");
        filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
    }
}

/* Feature note (subtle paid notice) */
.feature-note {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.01em;
    /* 경고(빨강) 느낌을 피하고, LunoBar 톤(보라 계열)로 은은하게 */
    color: rgba(129, 140, 248, 0.9); /* --primary-light 계열 */
}

.btn-rainbow-demo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
}

.btn-rainbow-demo:hover {
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.btn-rainbow-demo:active {
    transform: scale(0.95);
}

.btn-rainbow-demo svg {
    width: 20px;
    height: 20px;
}

/* 무지개색 애니메이션 */
@keyframes rainbow-color {
    0% { color: #ff0000; border-color: #ff0000; }
    14% { color: #ff7f00; border-color: #ff7f00; }
    28% { color: #ffff00; border-color: #ffff00; }
    42% { color: #00ff00; border-color: #00ff00; }
    57% { color: #0000ff; border-color: #0000ff; }
    71% { color: #4b0082; border-color: #4b0082; }
    85% { color: #9400d3; border-color: #9400d3; }
    100% { color: #ff0000; border-color: #ff0000; }
}

@keyframes rainbow-border {
    0% { border-color: #ff0000; }
    14% { border-color: #ff7f00; }
    28% { border-color: #ffff00; }
    42% { border-color: #00ff00; }
    57% { border-color: #0000ff; }
    71% { border-color: #4b0082; }
    85% { border-color: #9400d3; }
    100% { border-color: #ff0000; }
}

.launcher-bar-container.rainbow-animation .launcher-button {
    animation: rainbow-color 2s ease-in-out;
    animation-fill-mode: forwards;
}

.launcher-bar-container.rainbow-animation .launcher-button svg {
    animation: rainbow-color 2s ease-in-out;
    animation-fill-mode: forwards;
}

.feature-header-with-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.launcher-position-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.position-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    padding: 0;
}

.position-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.position-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

/* Download Section */
.download {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.download-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.download-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.download-description {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.download-options {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.download-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    flex: 0 0 400px;
    width: 100%;
}

.download-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-icon img {
    object-fit: contain;
    border-radius: 12px;
}

.download-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.download-card-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-download {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-tertiary);
}

.system-requirements {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 16px;
    flex: 0 0 300px;
    text-align: left;
}

.system-requirements h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.system-requirements ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-requirements li {
    font-size: 16px;
    opacity: 0.9;
    padding-left: 24px;
    position: relative;
}

.system-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: white;
    font-weight: 700;
}

/* About Section */
.about {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.about-description {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 64px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 48px;
    margin-top: 64px;
}

.about-feature {
    text-align: center;
}

.about-feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-feature h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.about-feature p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    background: rgba(31, 31, 31, 0.8);
    backdrop-filter: blur(12px);
    color: white;
    border-top: 1px solid var(--border);
}

/* -------------------------- */
/* Legal pages (Terms/Privacy) */
/* -------------------------- */
.legal-article {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.legal-article h2 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.legal-article ul {
    margin-top: 8px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-article b {
    color: var(--text-primary);
}

.legal-note {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    margin-bottom: 48px;
    justify-content: space-between;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 16px;
    opacity: 0.7;
}

.footer-company {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    word-break: keep-all;
}

.footer-company .footer-phone {
    display: inline-block;
    margin-left: 28px; /* 사업자등록번호와 넓은 간격 유지 */
    white-space: nowrap;
}

.footer-company .footer-phone-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    user-select: none;
    background: rgba(255, 255, 255, 0.04);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.footer-company .footer-phone-info:hover,
.footer-company .footer-phone-info:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.footer-company .footer-phone-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    width: min(520px, calc(100vw - 32px));
    max-width: 520px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.55;
    white-space: normal;
    word-break: keep-all;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
}

.footer-company .footer-phone-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(20, 20, 20, 0.96);
}

.footer-company .footer-phone-info:hover .footer-phone-tooltip,
.footer-company .footer-phone-info:focus .footer-phone-tooltip,
.footer-company .footer-phone-info:focus-within .footer-phone-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .footer-company .footer-phone {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    .footer-company .footer-phone-info {
        vertical-align: middle;
    }
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin-left: auto;
    margin-right: 0;
}

/* -------------------------- */
/* Purchase page (skeleton)   */
/* -------------------------- */
.purchase-hero {
    padding: 88px 0 48px;
    background: radial-gradient(1000px 500px at 15% 10%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
                radial-gradient(800px 420px at 80% 20%, rgba(236, 72, 153, 0.18) 0%, transparent 60%),
                var(--bg-primary);
}

.purchase-hero-inner {
    max-width: 920px;
}

.purchase-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    margin-bottom: 14px;
}

.purchase-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 14px;
}

.purchase-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 860px;
}

.purchase-notice {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.purchase-notice-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.purchase-notice-body {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    line-height: 1.6;
}

.purchase-section {
    padding: 36px 0 84px;
}

/* -------------------------- */
/* Purchase carousel (3D)     */
/* -------------------------- */
.purchase-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-carousel-viewport {
    width: 100%;
    overflow: hidden;
    padding: 14px 0;
}

.purchase-carousel-track {
    position: relative;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    transform-style: preserve-3d;
    user-select: none;
    touch-action: pan-y;
}

.purchase-carousel-track.is-dragging {
    cursor: grabbing;
}

.purchase-carousel-nav {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.purchase-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(99, 102, 241, 0.55);
}

.purchase-carousel-nav span {
    font-size: 26px;
    line-height: 1;
    transform: translateY(-1px);
}

.purchase-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    min-height: 240px;
    width: 260px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    transition: transform 260ms ease, opacity 260ms ease, filter 260ms ease, box-shadow 260ms ease;

    /* 3D coverflow effect:
       --offset: ... -2, -1, 0, 1, 2 ...
    */
    --offset: 0;
    --absOffset: 0;
    transform:
        translate(-50%, -50%)
        translateX(calc(var(--offset) * 190px))
        rotateY(calc(var(--offset) * -28deg))
        translateZ(calc((1 - (var(--absOffset) * 0.20)) * 140px));
    opacity: calc(1 - (var(--absOffset) * 0.18));
    filter: blur(calc(var(--absOffset) * 0.6px));
    pointer-events: auto;
}

.purchase-card.featured {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 18px 34px -18px rgba(99, 102, 241, 0.45);
}

.purchase-card.is-active {
    border-color: rgba(99, 102, 241, 0.62);
    box-shadow: 0 22px 48px -20px rgba(99, 102, 241, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .purchase-card {
        transition: none;
        filter: none;
    }
}

.purchase-card-name {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
}

.purchase-card-desc {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.purchase-card-price {
    margin-top: 18px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.purchase-card-price-main {
    font-size: 22px;
    font-weight: 800;
}

.purchase-card-price-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

/* 카드 리스트는 현재 사용하지 않음 (필요 시 재사용) */
.purchase-card-list { display: none; }

.purchase-cta {
    margin-top: 16px;
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    cursor: pointer;
}

.purchase-cta.primary {
    background: var(--gradient-primary);
    border-color: rgba(99, 102, 241, 0.6);
    color: #fff;
}

.purchase-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.purchase-cta.link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


.footer-column h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-column a,
.footer-column span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: white;
}

/* 제품 항목 간격 통일 - LunoBar, CGM, CVM 모두 동일한 간격 */
.footer-column > span:not(.product-item) {
    margin-bottom: 12px;
}

.footer-column .product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 0;
}

.footer-column .product-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
}

.footer-column .product-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin: 0;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
    text-align: right;
    font-size: 13px;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .visual-container {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .launcher-bar-fixed {
        display: none;
    }

    .hero-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-right {
        gap: 12px; /* 모바일에서 간격 축소 */
    }


    .hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 18px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 32px;
    }

    .download-title {
        font-size: 36px;
    }

    .download-options {
        flex-direction: column;
        align-items: center;
    }

    .download-card {
        flex: 1 1 auto;
        max-width: 400px;
    }

    .system-requirements {
        flex: 1 1 auto;
        max-width: 400px;
    }

    .about-title {
        font-size: 36px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    /* 모바일에서 런처 바가 보일 때 오른쪽 패딩 추가 */
    .launcher-bar-container:not(.hidden) {
        width: 50px; /* 모바일에서 약간 축소 */
    }

    /* 모바일에서 기본적으로 런처 바 공간 확보 (JavaScript로 동적 조정) */
    .container {
        padding-right: 74px; /* 50px 런처 + 24px 여백 */
    }
    
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
        padding-right: 66px; /* 50px 런처 + 16px 여백 */
    }


    .hero-title {
        font-size: 28px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

}

/* ===========================
   창작마당 (Creations) - 초기 스캐폴딩
   =========================== */
.creations-page {
    padding: 110px 0 64px;
}

.creations-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.creations-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.creations-subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
}

.creations-toolbar {
    display: grid;
    grid-template-columns: 1fr 420px 180px;
    gap: 12px;
    align-items: center;
    margin: 18px 0 16px;
}

.creations-tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.creations-tab {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.creations-tab:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.06);
}

.creations-tab.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--text-primary);
}

.creations-search-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.18);
    color: var(--text-primary);
    outline: none;
}

.cgm-sort {
    position: relative;
}

.cgm-sort-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.18);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cgm-sort-btn:hover {
    background: rgba(0,0,0,0.24);
    border-color: rgba(255,255,255,0.16);
}

.cgm-sort-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.cgm-sort-label {
    font-weight: 700;
    font-size: 13px;
}

.cgm-sort-chevron {
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
}

.cgm-sort-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(31, 31, 31, 0.98);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 50;
    padding: 6px;
}

.cgm-sort-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.86);
    text-align: left;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cgm-sort-option:hover,
.cgm-sort-option:focus-visible {
    background: rgba(255,255,255,0.06);
}

.cgm-sort-option.is-selected {
    background: rgba(99, 102, 241, 0.18);
    color: rgba(255,255,255,0.95);
}

.cgm-sort-option.is-selected::after {
    content: "✓";
    color: rgba(255,255,255,0.92);
    font-weight: 900;
}

.creations-callouts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.creations-callout {
    border: 1px solid var(--border);
    /* ✅ 게시물 카드(.cgm-card)보다 "확실히" 더 진하게: 구분감 (실사용에서 체감되게) */
    background: linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0.28));
    border-color: rgba(255,255,255,0.18);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.18) inset,
        0 10px 24px rgba(0,0,0,0.28);
    border-radius: 14px;
    padding: 14px 14px;
}

.creations-callout-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.creations-callout-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.cgm-card {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 14px 14px 12px;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
    outline: none;
    position: relative; /* 미리보기 버튼 배치 */
}

.cgm-card-inner {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 14px;
    align-items: stretch;
}

.cgm-card-main {
    min-width: 0;
}

.cgm-card-thumb {
    width: 150px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: radial-gradient(120px 120px at 20% 20%, rgba(99, 102, 241, 0.28), transparent 60%),
                radial-gradient(120px 120px at 80% 60%, rgba(236, 72, 153, 0.22), transparent 65%),
                rgba(0,0,0,0.22);
    position: relative;
}

.cgm-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.95;
}

.cgm-card-thumb.is-empty::after {
    content: "미리보기";
    position: absolute;
    left: 10px;
    bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,0.70);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(6px);
}

.cgm-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.045);
}

.cgm-card:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.cgm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    margin-bottom: 10px;
}

.cgm-badge.is-theme {
    border-color: rgba(99, 102, 241, 0.38);
    background: rgba(99, 102, 241, 0.14);
}

.cgm-badge.is-border {
    border-color: rgba(236, 72, 153, 0.38);
    background: rgba(236, 72, 153, 0.12);
}

/* 카드 우측 상단 미리보기 버튼 */
.cgm-card-preview-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.84);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    pointer-events: auto;
}
.cgm-card-preview-btn:hover { background: rgba(255,255,255,0.06); }
.cgm-card-preview-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 목록 페이지 프리뷰 모달 */
body.cgm-modal-open { overflow: hidden; }

.cgm-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.cgm-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

.cgm-preview-dialog {
    position: relative;
    width: min(560px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(31,31,31,0.78);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cgm-preview-dialog-head {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cgm-preview-dialog-post {
    margin-top: 4px;
    font-weight: 800;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cgm-preview-dialog-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cgm-preview-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.16);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.cgm-preview-close-btn:hover { background: rgba(255,255,255,0.06); }

/* 모달 안에서는 stage 높이를 패널 내부로 맞춤 */
.cgm-preview-dialog .cgm-preview-stage {
    height: auto;
    min-height: 520px;
    padding: 16px 14px 18px;
    flex: 1;
}

/* 목록 모달: 비율은 실제값 그대로 유지하되, 너무 얇아 "선"처럼 보이지 않도록 최소 폭만 보장 */
.cgm-preview-dialog .cgm-launcher-mock {
    /* ✅ 모달에서는 부모에 "명시적 height"가 없어 100%가 계산되지 않아 버튼이 1개만 보이던 문제 해결 */
    height: 520px;
    min-width: 56px;
    max-width: 140px;
}

.cgm-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 16px;
    line-height: 1.3;
}

.cgm-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
}

.cgm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    min-height: 18px;
}

.cgm-tag {
    font-size: 12px;
    color: var(--text-tertiary);
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.16);
    padding: 4px 8px;
    border-radius: 999px;
}

.cgm-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: var(--text-tertiary);
    font-size: 12px;
}

.cgm-like-btn {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.14);
    color: rgba(255,255,255,0.84);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cgm-like-btn:hover {
    background: rgba(255,255,255,0.06);
}

.cgm-like-btn.is-liked {
    border-color: rgba(236, 72, 153, 0.42);
    background: rgba(236, 72, 153, 0.14);
}

.cgm-like-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* 런처바 미리보기는 "고정형 프리뷰 도크"로 대체 (목록 페이지에서는 미사용) */

.cgm-textarea {
    min-height: 120px;
    resize: vertical;
}

.cgm-file-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cgm-size-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cgm-size-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 8px 10px;
}

.cgm-size-label {
    color: var(--text-tertiary);
    font-weight: 800;
    font-size: 12px;
}

.cgm-size-item input[type="number"] {
    width: 110px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: var(--text-primary);
}

.cgm-size-x {
    color: rgba(255,255,255,0.65);
    font-weight: 900;
    font-size: 14px;
}

.cgm-thumb-preview {
    margin-top: 10px;
    width: 260px;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
}

.cgm-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cgm-asset-name {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 창작마당 상세 페이지 */
.cgm-post {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
}

.cgm-post-head {
    margin-bottom: 12px;
}

.cgm-post-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 10px;
}

.cgm-post-meta {
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 700;
}

.cgm-post-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
}

.cgm-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.cgm-post-desc {
    margin-top: 14px;
    color: rgba(255,255,255,0.90);
    font-size: 14px;
    line-height: 1.7;
}

.cgm-post-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cgm-post-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cgm-post-stats {
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 700;
}

/* 상세: 좌측 글 + 우측 프리뷰(메인 페이지처럼 고정 영역) */
.cgm-detail-layout {
    position: relative;
    /* 우측 프리뷰 패널 고정폭만큼 공간 확보(가로 길이 과함 해결) */
    padding-right: 320px;
}

.cgm-detail-main {
    min-width: 0;
}

.cgm-preview-panel {
    /* 컨테이너 안이 아니라, 화면 오른쪽에 붙여서 "더 오른쪽" 배치 */
    position: fixed;
    top: 86px;
    right: calc(var(--launcher-edge-offset, 0px) + 18px);
    width: 300px; /* ✅ 가로 길이 축소 */
    height: calc(100vh - 110px);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(31,31,31,0.62);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 900;
}

.cgm-preview-panel-head {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.cgm-preview-panel-title {
    font-weight: 900;
    font-size: 14px;
    color: rgba(255,255,255,0.92);
}

.cgm-preview-panel-sub {
    font-weight: 800;
    font-size: 12px;
    color: rgba(255,255,255,0.62);
    white-space: nowrap;
}

.cgm-preview-stage {
    padding: 14px 12px 16px;
    height: calc(100% - 49px);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 런처바 모형: 업로드 런처 사이즈 비율대로(뚱뚱해 보이는 문제 해결) */
.cgm-launcher-mock {
    /* JS에서 --cgm-aspect: "가로 / 세로" 형태로 주입 */
    aspect-ratio: var(--cgm-aspect, 60 / 1392);
    height: 100%;
    width: auto;
    height: 100%;
    max-height: 820px;
    /* ✅ 업로드 이미지는 각진데 프리뷰에서 둥글게 잘려 보이는 문제 해결 */
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.22);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%; /* ✅ 전체를 한눈에(잘림 없음) */
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.12) inset,
        0 18px 44px rgba(0,0,0,0.42);
    position: relative;
}

/* ✅ 테두리(kind=border): 런처바 전체가 아니라 "각 폴더 아이콘(버튼)" 테두리에 적용 (LunoBar와 동일 개념) */
.cgm-launcher-mock.is-border {
    /* 테두리는 버튼 단위이므로 런처 배경이미지로 쓰지 않는다 */
    background-image: none !important;
}

/* 버튼(폴더 아이콘)의 "기본 테두리"는 제거하고, 업로드 테두리만 보여준다 (이중 테두리 방지) */
.cgm-launcher-mock.is-border .cgm-launcher-btn {
    position: relative;
    border: none; /* ✅ 기본 테두리 제거 */
}

/* 업로드 테두리 이미지는 버튼 "가장자리(링)" 영역에만 표시 */
.cgm-launcher-mock.is-border .cgm-launcher-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background-image: var(--cgm-btn-border-image, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    opacity: var(--cgm-btn-border-opacity, 1);
    pointer-events: none;
    z-index: 2;
    /* ✅ 가운데(콘텐츠) 영역은 뚫고, 테두리 링만 남긴다 */
    --cgm-border-w: 2px;
    padding: var(--cgm-border-w);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

/* ✅ 테두리 프리뷰는 "가까이서" 봐야 의미가 있으므로, 아이콘을 크게/간격 넓게 + 일부만 표시 */
.cgm-launcher-mock.is-border .cgm-launcher-buttons {
    justify-content: center;
    padding: 18px 0;
    gap: 14px;
}

/* 너무 많은 아이콘은 테두리 확인에 방해 → 상위 6개만 */
.cgm-launcher-mock.is-border .cgm-launcher-buttons .cgm-launcher-btn:nth-child(n + 7) {
    display: none;
}

/* 테두리 디테일이 잘 보이도록 아이콘 자체를 확대 */
.cgm-launcher-mock.is-border .cgm-launcher-btn {
    width: clamp(34px, 78%, 56px);
    border-radius: 10px;
    background: rgba(0,0,0,0.10);
    /* ✅ 기본 라인/테두리 느낌(인셋) 제거: 업로드 테두리만 보이게 */
    box-shadow: 0 14px 26px rgba(0,0,0,0.28);
}

/* 링 두께/가시성 강화 */
.cgm-launcher-mock.is-border .cgm-launcher-btn::after {
    --cgm-border-w: 4px;
    filter:
        drop-shadow(0 10px 16px rgba(0,0,0,0.35))
        drop-shadow(0 0 10px rgba(255,255,255,0.12));
}

/* 모달은 더 크게 보여주기 */
.cgm-preview-dialog .cgm-launcher-mock.is-border {
    min-width: 220px;
    max-width: 360px;
}

/* 이미지 톤이 죽지 않도록 베일은 약하게 */
.cgm-launcher-mock::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.16));
    pointer-events: none;
}

.cgm-launcher-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    height: 100%;
}

.cgm-launcher-btn {
    width: clamp(16px, 72%, 30px);
    aspect-ratio: 1 / 1;
    border-radius: 6px; /* ✅ 실제 LunoBar 폴더 버튼 느낌(원형 방지) */
    border: 1px solid rgba(255,255,255,0.60);
    background: rgba(0,0,0,0.10);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 10px 18px rgba(0,0,0,0.24);
    backdrop-filter: blur(10px);
    position: relative;
    color: rgba(255,255,255,0.86);
}

/* 폴더 아이콘(미리보기용) */
.cgm-launcher-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72%;
    height: 72%;
    background: currentColor;
    opacity: 0.92;
    /* Filled folder icon mask */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M10%204H4a2%202%200%200%200-2%202v12a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V8a2%202%200%200%200-2-2h-8L10%204z%27/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M10%204H4a2%202%200%200%200-2%202v12a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V8a2%202%200%200%200-2-2h-8L10%204z%27/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

@media (max-width: 980px) {
    .cgm-detail-layout {
        padding-right: 0;
    }
    .cgm-preview-panel {
        position: static;
        width: auto;
        height: auto;
        margin-top: 14px;
    }
    .cgm-preview-stage {
        height: auto;
        min-height: 420px;
    }
    .cgm-launcher-mock {
        height: 560px;
        max-height: none;
    }
}

/* 고정형 런처 프리뷰 도크 (창 크기/버튼 개수 영향 없음) */
.cgm-preview-dock {
    position: fixed;
    top: 86px;
    right: 18px;
    width: 220px;
    z-index: 999;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(31,31,31,0.88);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.cgm-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.cgm-preview-title {
    font-weight: 900;
    font-size: 13px;
    color: rgba(255,255,255,0.92);
}

.cgm-preview-close {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.16);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.cgm-preview-close:hover {
    background: rgba(255,255,255,0.06);
}

.cgm-preview-launcher {
    position: relative;
    padding: 12px;
    display: flex;
    justify-content: center;
}

.cgm-preview-bar {
    position: relative;
    width: 74px;
    height: 520px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.22);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.10) inset,
        0 18px 44px rgba(0,0,0,0.40);
}

.cgm-preview-img {
    position: absolute;
    width: 100%;
    height: auto;
    left: 0;
    top: 0;
    display: block;
    filter: saturate(1.08) contrast(1.03);
    transform: translateY(var(--cgm-preview-scroll, 0px));
}

.cgm-preview-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    /* 이미지 색이 죽지 않게 베일을 약하게 */
    background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.18));
    pointer-events: none;
}

.cgm-preview-bar::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 0 1px rgba(0,0,0,0.18);
    pointer-events: none;
}

.cgm-preview-btns {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
    align-items: center;
}

.cgm-preview-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.55);
    background: rgba(0,0,0,0.14);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 10px 18px rgba(0,0,0,0.24);
    backdrop-filter: blur(10px);
}

.cgm-preview-dock.is-theme .cgm-preview-bar {
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.28) inset,
        0 18px 44px rgba(0,0,0,0.40),
        0 10px 28px rgba(99, 102, 241, 0.10);
}

.cgm-preview-dock.is-border .cgm-preview-bar {
    box-shadow:
        0 0 0 1px rgba(236, 72, 153, 0.24) inset,
        0 18px 44px rgba(0,0,0,0.40),
        0 10px 28px rgba(236, 72, 153, 0.08);
}

@media (max-width: 768px) {
    .cgm-preview-dock {
        right: 10px;
        width: 200px;
    }
}

.cgm-meta-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cgm-author {
    color: rgba(255,255,255,0.78);
    font-weight: 700;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cgm-dot { opacity: 0.6; }

.cgm-meta-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cgm-stat {
    color: rgba(255,255,255,0.72);
    font-weight: 700;
}

.creations-empty {
    margin-top: 16px;
    color: var(--text-secondary);
    padding: 14px;
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}

@media (max-width: 1024px) {
    .creations-toolbar {
        grid-template-columns: 1fr 1fr;
    }
    .creations-sort { grid-column: 2 / 3; }
    .creations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cgm-card-inner {
        grid-template-columns: 1fr 140px;
    }
    .cgm-card-thumb { width: 140px; }
}

@media (max-width: 768px) {
    .creations-toolbar {
        grid-template-columns: 1fr;
    }
    .creations-callouts {
        grid-template-columns: 1fr;
    }
    .creations-grid {
        grid-template-columns: 1fr;
    }

    .cgm-card-inner {
        grid-template-columns: 1fr;
    }
    .cgm-card-thumb {
        width: 100%;
        height: 180px;
    }
}
