        /* =====================================================================
           1. 디자인 토큰 — 사용자 테마 설정이 이 변수들을 덮어씁니다
           ===================================================================== */
        :root {
            --accent: #ffffff;
            --accent-rgb: 255, 255, 255;
            --on-accent: #0f1114;

            --glass-alpha: .06;
            --glass-blur: 18px;
            --overlay: .75;
            --bg-blur: 0px;

            --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
            --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

            --text: #ffffff;
            --text-2: rgba(255, 255, 255, .74);
            --text-3: rgba(255, 255, 255, .5);
            --line: rgba(255, 255, 255, .1);
            --line-2: rgba(255, 255, 255, .18);
            --fill: rgba(255, 255, 255, .055);
            --fill-2: rgba(255, 255, 255, .1);
            --fill-3: rgba(255, 255, 255, .16);
            --danger: #fca5a5;
            --success: #86efac;

            --ease: cubic-bezier(.16, 1, .3, 1);

            /* 모서리 (data-radius 로 전환) */
            --r-card: 28px;
            --r-ctrl: 999px;
            --r-input: 16px;
            --r-inner: 20px;
            --r-nav: 999px;

            --drawer-w: 440px;
        }
        html[data-radius="soft"]  { --r-card: 20px; --r-ctrl: 14px; --r-input: 12px; --r-inner: 14px; --r-nav: 18px; }
        html[data-radius="sharp"] { --r-card: 10px; --r-ctrl: 8px;  --r-input: 8px;  --r-inner: 6px;  --r-nav: 12px; }

        /* =====================================================================
           2. 기본 / 리셋
           ===================================================================== */
        *, *::before, *::after { box-sizing: border-box; }
        [hidden] { display: none !important; }
        html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
        body {
            margin: 0;
            min-height: 100vh;
            font-family: var(--font);
            color: var(--text);
            background: #0d0f12;
            line-height: 1.5;
            letter-spacing: -0.01em;
            word-break: keep-all;          /* 한글 단어 중간 줄바꿈 방지 */
            overflow-wrap: break-word;     /* 긴 URL 등은 넘치지 않게 */
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transition: padding-right .5s var(--ease);
        }
        body.no-scroll { overflow: hidden; }
        @media (max-width: 899px) { body.no-scroll-mobile { overflow: hidden; } }
        ::selection { background: var(--accent); color: var(--on-accent); }
        img { display: block; max-width: 100%; }
        a { color: inherit; text-decoration: none; }
        button, input, textarea, select { font: inherit; color: inherit; }
        button { cursor: pointer; background: none; border: 0; padding: 0; }
        :focus-visible { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; }
        [role="dialog"]:focus, [role="alertdialog"]:focus { outline: none; }
        h1, h2, h3, p { margin: 0; }

        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
        ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .32); }

        /* =====================================================================
           3. 배경 레이어 (이미지 / 그라데이션 / 단색 + 어둡게 + 흐림 + 파티클)
           ===================================================================== */
        #bg-layer {
            position: fixed;
            inset: calc(var(--bg-blur) * -2);
            z-index: 0;
            background-color: #111315;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            filter: blur(var(--bg-blur));
            transition: filter .4s ease, background-color .4s ease;
        }
        #bg-overlay {
            position: fixed;
            inset: 0;
            z-index: 1;
            background: linear-gradient(to bottom,
                rgba(10, 12, 14, calc(var(--overlay) * .6)),
                rgba(10, 12, 14, var(--overlay)));
            transition: background .3s ease;
        }
        #fx-canvas {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 2;
            pointer-events: none;
        }

        /* =====================================================================
           4. 유리(Glass) 표면
           ===================================================================== */
        .glass {
            background: linear-gradient(180deg,
                rgba(255, 255, 255, calc(var(--glass-alpha) + .025)),
                rgba(255, 255, 255, var(--glass-alpha)));
            backdrop-filter: blur(var(--glass-blur)) saturate(150%);
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
            border: 1px solid rgba(255, 255, 255, .16);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, .1),
                0 30px 70px -24px rgba(0, 0, 0, .6);
        }
        /* 설정창·모달은 사용자 설정과 무관하게 항상 읽기 쉬운 불투명 유리 */
        .glass-strong {
            background: rgba(20, 22, 26, .82);
            backdrop-filter: blur(28px) saturate(160%);
            -webkit-backdrop-filter: blur(28px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, .12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 40px 90px -20px rgba(0, 0, 0, .75);
        }

        /* =====================================================================
           5. 버튼
           ===================================================================== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .5rem;
            height: 46px;
            padding: 0 1.25rem;
            border-radius: var(--r-ctrl);
            font-size: .875rem;
            font-weight: 600;
            letter-spacing: -.01em;
            white-space: nowrap;
            user-select: none;
            transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .25s, filter .2s, opacity .2s;
        }
        .btn:active { transform: scale(.98); }
        .btn[disabled] { opacity: .55; pointer-events: none; }
        .btn-sm { height: 36px; padding: 0 .95rem; font-size: .8rem; }
        .btn-xs { height: 30px; padding: 0 .75rem; font-size: .75rem; gap: .35rem; }
        .btn-block { width: 100%; }
        .btn-primary {
            background: var(--accent);
            color: var(--on-accent);
            box-shadow: 0 10px 28px -10px rgba(var(--accent-rgb), .6);
        }
        .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 32px -8px rgba(var(--accent-rgb), .65); }
        .btn-ghost {
            background: var(--fill);
            border: 1px solid var(--line-2);
            color: var(--text);
        }
        .btn-ghost:hover { background: var(--fill-2); border-color: rgba(255, 255, 255, .3); }
        .btn-text { color: var(--text-2); background: transparent; }
        .btn-text:hover { color: var(--text); background: var(--fill); }
        .btn-danger { background: #ef4444; color: #fff; box-shadow: 0 10px 28px -10px rgba(239, 68, 68, .6); }
        .btn-danger:hover { filter: brightness(1.08); }
        .btn.is-busy::before {
            content: '';
            width: 14px;
            height: 14px;
            border: 2px solid currentColor;
            border-right-color: transparent;
            border-radius: 50%;
            animation: spin .7s linear infinite;
        }

        .icon-btn {
            display: inline-grid;
            place-items: center;
            width: 38px;
            height: 38px;
            flex-shrink: 0;
            border-radius: var(--r-ctrl);
            color: var(--text-2);
            background: var(--fill);
            border: 1px solid var(--line);
            transition: color .2s, background-color .2s, border-color .2s, transform .2s var(--ease);
        }
        .icon-btn:hover { color: var(--text); background: var(--fill-2); border-color: var(--line-2); }
        .icon-btn:active { transform: scale(.94); }
        .icon-btn.is-active { color: var(--on-accent); background: var(--accent); border-color: transparent; }
        .icon-btn.danger:hover { color: var(--danger); border-color: rgba(252, 165, 165, .4); background: rgba(252, 165, 165, .1); }

        /* =====================================================================
           6. 상단 네비게이션
           ===================================================================== */
        .topnav {
            position: fixed;
            top: 14px;
            left: 0;
            right: 0;
            z-index: 40;
            padding: 0 16px;
            transition: right .5s var(--ease);
        }
        .topnav-inner {
            max-width: 1180px;
            height: 58px;
            margin: 0 auto;
            padding: 0 10px 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-radius: var(--r-nav);
        }
        .brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .95rem; letter-spacing: -.02em; }
        .brand-mark {
            display: grid;
            place-items: center;
            width: 30px;
            height: 30px;
            border-radius: 9px;
            background: var(--accent);
            color: var(--on-accent);
            font-size: .8rem;
        }
        .nav-links {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(8px, 1.5vw, 22px);
            min-width: 0;
            margin: 0 auto;
            padding: 0 14px;
        }
        .nav-links a {
            flex: 0 0 auto;
            padding: 8px 2px;
            color: var(--text-2);
            font-size: .78rem;
            font-weight: 600;
            white-space: nowrap;
            transition: color .2s ease;
        }
        .nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
        .nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
        .nav-me {
            display: inline-flex;
            align-items: center;
            gap: .5rem;
            height: 38px;
            padding: 0 .85rem 0 .3rem;
            border-radius: var(--r-ctrl);
            background: var(--fill);
            border: 1px solid var(--line);
            font-size: .8rem;
            font-weight: 500;
            transition: background-color .2s, border-color .2s;
        }
        .nav-me:hover { background: var(--fill-2); border-color: var(--line-2); }
        .nav-me img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #1d2026; }

        /* =====================================================================
           7. 히어로 / 프로필 카드
           ===================================================================== */
        .hero {
            position: relative;
            z-index: 3;
            min-height: 100vh;
            min-height: 100svh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 104px 16px 88px;
        }
        .profile-card {
            width: 100%;
            max-width: var(--profile-width, 440px);
            padding: 40px 32px 32px;
            border-radius: var(--r-card);
            text-align: center;
        }
        .hero-mark {
            display: grid;
            place-items: center;
            width: 76px;
            height: 76px;
            margin: 0 auto 22px;
            border-radius: 24px;
            background: var(--accent);
            color: var(--on-accent);
            font-size: 1.8rem;
            box-shadow: 0 16px 40px -14px rgba(var(--accent-rgb), .7);
        }
        .avatar {
            width: var(--avatar-size, 108px);
            height: var(--avatar-size, 108px);
            margin: 0 auto 20px;
            padding: 4px;
            border-radius: 50%;
            background: linear-gradient(140deg, rgba(var(--accent-rgb), .95), rgba(255, 255, 255, .12) 70%);
            box-shadow: 0 14px 36px -14px rgba(var(--accent-rgb), .65);
        }
        .avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            background: #1d2026;
            border: 3px solid rgba(13, 15, 18, .65);
        }
        html[data-avatar="rounded"] .avatar { border-radius: 30%; }
        html[data-avatar="rounded"] .avatar img { border-radius: 27%; }

        .profile-name { font-size: 1.85rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; word-break: keep-all; }
        .profile-handle { margin-top: .35rem; font-family: var(--mono); font-size: .78rem; color: var(--text-3); }
        .profile-meta {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: .35rem 1rem;
            margin-top: .9rem;
            font-size: .82rem;
            color: var(--text-2);
        }
        .profile-meta i { margin-right: .4rem; font-size: .75rem; color: rgba(var(--accent-rgb), .85); }
        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: .55rem;
            margin-top: 1rem;
            padding: .4rem .85rem;
            border-radius: 999px;
            background: rgba(var(--accent-rgb), .1);
            border: 1px solid rgba(var(--accent-rgb), .3);
            font-size: .76rem;
            font-weight: 500;
        }
        .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
        .profile-bio {
            margin-top: 1.15rem;
            font-size: .92rem;
            line-height: 1.75;
            color: var(--text-2);
            white-space: pre-line;
            word-break: keep-all;
        }
        .social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 1.35rem; }
        .social-row a {
            display: grid;
            place-items: center;
            width: 40px;
            height: 40px;
            border-radius: var(--r-ctrl);
            background: var(--fill);
            border: 1px solid var(--line);
            color: var(--text-2);
            font-size: .95rem;
            transition: color .2s, background-color .2s, border-color .2s, transform .25s var(--ease);
        }
        .social-row a:hover { color: var(--on-accent); background: var(--accent); border-color: transparent; transform: translateY(-2px); }
        .views-pill {
            display: inline-flex;
            align-items: center;
            gap: .5rem;
            margin-top: 1.35rem;
            padding: .4rem .9rem;
            border-radius: 999px;
            background: var(--fill);
            border: 1px solid var(--line);
            font-size: .76rem;
            color: var(--text-2);
        }
        .views-pill strong { color: var(--text); font-weight: 600; }
        .hero-actions { display: grid; gap: 10px; margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
        .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

        .scroll-hint {
            position: absolute;
            bottom: 28px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            font-size: .68rem;
            letter-spacing: .22em;
            text-transform: uppercase;
            color: var(--text-3);
            animation: bob 2.4s ease-in-out infinite;
            transition: color .2s;
        }
        .scroll-hint:hover { color: var(--text); }

        /* =====================================================================
           8. 프로젝트 섹션 / 카드
           ===================================================================== */
        .projects {
            position: relative;
            z-index: 3;
            max-width: 720px;
            margin: 0 auto;
            padding: 48px 16px 128px;
            transition: max-width .4s var(--ease);
        }
        html[data-layout="grid"] .projects { max-width: 1080px; }
        .section-head { text-align: center; margin-bottom: 44px; }
        .eyebrow {
            display: inline-flex;
            padding: .4rem .95rem;
            border-radius: 999px;
            font-size: .68rem;
            font-weight: 600;
            letter-spacing: .18em;
            text-transform: uppercase;
            color: var(--text-2);
            background: var(--fill);
            border: 1px solid var(--line-2);
            margin-bottom: .9rem;
        }
        .section-title { font-size: clamp(1.55rem, 3.4vw, 2.1rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
        .section-sub { margin-top: .5rem; font-size: .85rem; color: var(--text-3); }

        .feed { display: grid; gap: 28px; }
        html[data-layout="grid"] .feed { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
        .feed > .empty { grid-column: 1 / -1; }

        .card {
            display: flex;
            flex-direction: column;
            border-radius: var(--r-card);
            overflow: hidden;
        }
        .card:hover { border-color: rgba(255, 255, 255, .26); }
        .card-media {
            position: relative;
            display: block;
            aspect-ratio: 16 / 9;
            margin: 10px 10px 0;
            border-radius: max(4px, calc(var(--r-card) - 10px));
            overflow: hidden;
            background: rgba(0, 0, 0, .3);
        }
        .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
        .card:hover .card-media img { transform: scale(1.045); }
        .card-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 22px 24px 22px; }
        .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
        .card-heading { min-width: 0; }
        .card-title { font-size: 1.22rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
        .card-desc { font-size: .9rem; line-height: 1.75; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
        html[data-layout="grid"] .card-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
        .card-actions { display: flex; gap: 6px; flex-shrink: 0; }
        .card-actions .icon-btn { width: 32px; height: 32px; font-size: .72rem; }
        .pin-badge {
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            margin-bottom: .55rem;
            padding: .22rem .6rem;
            border-radius: 999px;
            background: var(--accent);
            color: var(--on-accent);
            font-size: .66rem;
            font-weight: 700;
            letter-spacing: .08em;
            text-transform: uppercase;
        }
        .author { display: flex; width: max-content; max-width: 100%; align-items: center; gap: .45rem; margin-bottom: .55rem; font-family: var(--mono); font-size: .74rem; color: var(--text-3); transition: color .2s; }
        .author:hover { color: var(--text); }
        .author img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #1d2026; }
        .tags { display: flex; flex-wrap: wrap; gap: 6px; }
        .tag {
            padding: .28rem .72rem;
            border-radius: 999px;
            font-size: .72rem;
            font-weight: 500;
            color: var(--text-2);
            background: var(--fill);
            border: 1px solid var(--line);
        }
        .card-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: auto;
            padding-top: 16px;
            border-top: 1px solid var(--line);
        }
        .card-date { font-size: .74rem; color: var(--text-3); }
        .card-foot .btn { max-width: 70%; }
        .card-foot .btn span { overflow: hidden; text-overflow: ellipsis; }

        .empty { padding: 48px 28px; border-radius: var(--r-card); text-align: center; }
        .empty-icon {
            display: grid;
            place-items: center;
            width: 56px;
            height: 56px;
            margin: 0 auto 16px;
            border-radius: 18px;
            background: var(--fill);
            border: 1px solid var(--line);
            font-size: 1.3rem;
            color: var(--text-2);
        }
        .empty h3 { font-size: 1.02rem; font-weight: 600; }
        .empty p { margin-top: .4rem; font-size: .86rem; color: var(--text-3); }
        .empty .btn { margin-top: 1.25rem; }

        /* 로딩 스켈레톤 */
        .skeleton .sk { position: relative; overflow: hidden; background: rgba(255, 255, 255, .07); border-radius: 8px; }
        .skeleton .sk::after {
            content: '';
            position: absolute;
            inset: 0;
            transform: translateX(-100%);
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
            animation: shimmer 1.4s infinite;
        }
        .skeleton .sk-media { aspect-ratio: 16 / 9; margin: 10px 10px 0; border-radius: max(4px, calc(var(--r-card) - 10px)); }
        .skeleton .sk-line { height: 12px; }
        .w40 { width: 40%; } .w60 { width: 60%; } .w90 { width: 90%; }

        /* =====================================================================
           9. 스크롤 블러 리빌 애니메이션
           ===================================================================== */
        .reveal {
            opacity: 0;
            filter: blur(16px);
            transform: translateY(30px) scale(.975);
            transition:
                opacity .9s var(--ease),
                filter .9s var(--ease),
                transform .9s var(--ease),
                border-color .3s;
            will-change: opacity, filter, transform;
        }
        .reveal.is-visible { opacity: 1; filter: blur(0); transform: none; }

        /* =====================================================================
           10. 오버레이 공통 (모달 / 드로어)
           ===================================================================== */
        .overlay {
            position: fixed;
            inset: 0;
            z-index: 60;
            visibility: hidden;
            opacity: 0;
            transition: opacity .3s var(--ease), visibility 0s linear .35s;
        }
        .overlay.open { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
        .overlay-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 8, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
        .overlay-center { display: grid; place-items: center; padding: 16px; }

        .modal {
            position: relative;
            width: 100%;
            max-width: 520px;
            max-height: min(90vh, 860px);
            max-height: min(90svh, 860px);
            display: flex;
            flex-direction: column;
            border-radius: min(var(--r-card), 26px);
            overflow: hidden;
            transform: translateY(18px) scale(.98);
            transition: transform .4s var(--ease);
        }
        .overlay.open .modal { transform: none; }
        .modal-sm { max-width: 380px; }
        .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
        .modal-head h3, .drawer-head h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.025em; }
        .modal-head p, .drawer-head p { margin-top: .3rem; font-size: .8rem; line-height: 1.55; color: var(--text-3); }
        .modal-body { flex: 1; overflow-y: auto; padding: 22px 24px 24px; overscroll-behavior: contain; }
        .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .14); }
        .modal-foot .btn { min-width: 96px; }

        .confirm-body { text-align: center; padding-top: 30px; }
        .confirm-icon {
            display: grid;
            place-items: center;
            width: 52px;
            height: 52px;
            margin: 0 auto 16px;
            border-radius: 50%;
            background: rgba(239, 68, 68, .14);
            color: #fca5a5;
            font-size: 1.15rem;
        }
        .confirm-body h3 { font-size: 1.05rem; font-weight: 700; }
        .confirm-body p { margin-top: .5rem; font-size: .86rem; color: var(--text-2); line-height: 1.6; word-break: keep-all; }
        .modal-sm .modal-foot { justify-content: stretch; }
        .modal-sm .modal-foot .btn { flex: 1; }

        /* 설정 드로어 — 데스크톱에선 오른쪽 패널, 모바일에선 바텀시트 */
        .drawer {
            position: absolute;
            top: 12px;
            right: 12px;
            bottom: 12px;
            width: min(var(--drawer-w), calc(100vw - 24px));
            display: flex;
            flex-direction: column;
            border-radius: min(var(--r-card), 24px);
            overflow: hidden;
            pointer-events: auto;
            transform: translateX(calc(100% + 24px));
            transition: transform .5s var(--ease);
        }
        .overlay.open .drawer { transform: none; }
        .overlay-drawer .overlay-backdrop { background: rgba(5, 6, 8, .35); backdrop-filter: none; -webkit-backdrop-filter: none; }
        .drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 0; }
        .drawer-body { flex: 1; overflow-y: auto; padding: 22px 22px 32px; overscroll-behavior: contain; border-top: 1px solid var(--line); }
        .drawer-foot { display: flex; gap: 8px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(0, 0, 0, .16); }
        .drawer-foot .btn { flex: 1; }
        .drawer-foot .btn-primary { flex: 1.7; }

        @media (min-width: 900px) {
            /* 드로어가 열려 있어도 페이지를 보면서(스크롤하면서) 실시간 미리보기 */
            .overlay-drawer { pointer-events: none; }
            .overlay-drawer .overlay-backdrop { display: none; }
            body.drawer-open { padding-right: calc(var(--drawer-w) + 24px); }
            body.drawer-open .topnav { right: calc(var(--drawer-w) + 24px); }
        }
        @media (max-width: 640px) {
            .drawer {
                top: auto;
                left: 0;
                right: 0;
                bottom: 0;
                width: 100%;
                height: min(88vh, 780px);
                height: min(88svh, 780px);
                border-radius: 24px 24px 0 0;
                transform: translateY(100%);
            }
            .drawer::before {
                content: '';
                position: absolute;
                top: 8px;
                left: 50%;
                width: 40px;
                height: 4px;
                margin-left: -20px;
                border-radius: 4px;
                background: rgba(255, 255, 255, .22);
            }
            .overlay-center { align-items: end; padding: 0; }
            .modal { max-width: none; border-radius: 24px 24px 0 0; transform: translateY(40px); }
            .modal-sm { margin: 0 12px 12px; border-radius: 22px; width: calc(100% - 24px); }
            .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
        }

        /* =====================================================================
           11. 탭 / 폼 컨트롤
           ===================================================================== */
        .tabs {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 4px;
            margin: 18px 22px 16px;
            padding: 4px;
            border-radius: calc(var(--r-input) + 2px);
            background: var(--fill);
            border: 1px solid var(--line);
        }
        .tab {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .4rem;
            height: 38px;
            border-radius: max(4px, calc(var(--r-input) - 2px));
            font-size: .8rem;
            font-weight: 500;
            color: var(--text-3);
            transition: color .2s, background-color .2s;
        }
        .tab i { font-size: .78rem; }
        .tab:hover { color: var(--text); }
        .tab[aria-selected="true"] { color: var(--text); background: var(--fill-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 8px rgba(0, 0, 0, .25); }

        .stack { display: grid; gap: 20px; }
        .panel { display: grid; gap: 22px; }
        .field { display: grid; gap: .5rem; }
        .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        @media (max-width: 420px) { .field-grid { grid-template-columns: 1fr; } }
        .label {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: .78rem;
            font-weight: 600;
            color: var(--text-2);
        }
        .label output, .counter { margin-left: auto; font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--text-3); }
        .req { color: var(--accent); margin-left: 2px; }
        .hint { font-size: .74rem; line-height: 1.5; color: var(--text-3); }
        .hint.ok { color: var(--success); }
        .hint.bad { color: var(--danger); }
        .group-title { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
        .divider { height: 1px; background: var(--line); }

        .input {
            width: 100%;
            height: 46px;
            padding: 0 14px;
            border-radius: var(--r-input);
            background: rgba(255, 255, 255, .045);
            border: 1px solid rgba(255, 255, 255, .13);
            font-size: .9rem;
            outline: none;
            transition: border-color .2s, background-color .2s, box-shadow .2s;
        }
        .input::placeholder { color: rgba(255, 255, 255, .32); }
        .input:hover { border-color: rgba(255, 255, 255, .22); }
        .input:focus { border-color: rgba(var(--accent-rgb), .75); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .13); }
        .textarea { height: auto; min-height: 104px; padding: 12px 14px; line-height: 1.65; resize: vertical; }
        .mono { font-family: var(--mono); font-size: .86rem; }
        .affix-wrap { position: relative; }
        .affix-wrap .affix {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: .78rem;
            color: var(--text-3);
            pointer-events: none;
        }
        .affix-wrap:not(.icon) .affix { font-family: var(--mono); }
        .affix-wrap .input { padding-left: 48px; }
        .affix-wrap.icon .affix { width: 18px; text-align: center; font-size: .88rem; }
        .affix-wrap.icon .input { padding-left: 42px; }

        /* 세그먼트 컨트롤 */
        .seg {
            display: flex;
            gap: 4px;
            padding: 4px;
            border-radius: calc(var(--r-input) + 2px);
            background: var(--fill);
            border: 1px solid var(--line);
        }
        .seg label { position: relative; flex: 1; }
        .seg input { position: absolute; opacity: 0; pointer-events: none; }
        .seg span {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .4rem;
            height: 36px;
            border-radius: max(4px, calc(var(--r-input) - 2px));
            font-size: .8rem;
            font-weight: 500;
            color: var(--text-3);
            cursor: pointer;
            transition: color .2s, background-color .2s;
        }
        .seg span:hover { color: var(--text); }
        .seg input:checked + span { color: var(--text); background: var(--fill-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 8px rgba(0, 0, 0, .25); }
        .seg input:focus-visible + span { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: -2px; }

        /* 스위치 */
        .switch-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 16px;
            border-radius: var(--r-input);
            background: var(--fill);
            border: 1px solid var(--line);
            cursor: pointer;
        }
        .switch-row strong { display: block; font-size: .86rem; font-weight: 600; }
        .switch-row small { display: block; margin-top: 2px; font-size: .74rem; color: var(--text-3); }
        .switch { position: relative; flex-shrink: 0; width: 46px; height: 28px; }
        .switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
        .switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background-color .25s; pointer-events: none; }
        .switch i::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
            transition: transform .3s var(--ease), background-color .25s;
        }
        .switch input:checked + i { background: var(--accent); }
        .switch input:checked + i::after { transform: translateX(18px); background: var(--on-accent); }
        .switch input:focus-visible + i { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; }

        /* 슬라이더 */
        .range {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            margin: 8px 0;
            border-radius: 999px;
            background: linear-gradient(to right, var(--accent) 0 var(--p, 50%), rgba(255, 255, 255, .14) var(--p, 50%) 100%);
            outline: none;
            cursor: pointer;
        }
        .range::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 0 0 4px rgba(var(--accent-rgb), .22);
            transition: transform .2s var(--ease);
        }
        .range::-webkit-slider-thumb:hover { transform: scale(1.12); }
        .range::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border: 0;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 0 0 4px rgba(var(--accent-rgb), .22);
        }
        .range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .6); }

        /* 색상 스와치 */
        .swatches { display: flex; flex-wrap: wrap; gap: 10px; }
        .swatch { position: relative; width: 34px; height: 34px; cursor: pointer; }
        .swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
        .swatch span {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: var(--c);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
            pointer-events: none;
            transition: transform .2s var(--ease), box-shadow .2s;
        }
        .swatch:hover span { transform: scale(1.08); }
        .swatch input:checked + span, .swatch-custom.is-active span { box-shadow: 0 0 0 2px #15171b, 0 0 0 4px #fff; }
        .swatch input:focus-visible + span { box-shadow: 0 0 0 2px #15171b, 0 0 0 4px rgba(var(--accent-rgb), 1); }
        .swatch-custom span {
            background: conic-gradient(from 0deg, #f87171, #fbbf24, #4ade80, #22d3ee, #818cf8, #f472b6, #f87171);
            color: #fff;
            font-size: .72rem;
            text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
        }
        .swatch-custom.is-active span { background: var(--c); }

        /* 그라데이션 프리셋 */
        .gradient-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
        .gradient-opt { position: relative; display: grid; gap: 6px; cursor: pointer; }
        .gradient-opt input { position: absolute; opacity: 0; pointer-events: none; }
        .gradient-tile { aspect-ratio: 4 / 3; border-radius: var(--r-input); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: box-shadow .2s, transform .25s var(--ease); }
        .gradient-opt:hover .gradient-tile { transform: translateY(-2px); }
        .gradient-opt input:checked ~ .gradient-tile { box-shadow: 0 0 0 2px #15171b, 0 0 0 4px var(--accent); }
        .gradient-opt input:focus-visible ~ .gradient-tile { box-shadow: 0 0 0 2px #15171b, 0 0 0 4px rgba(var(--accent-rgb), 1); }
        .gradient-name { text-align: center; font-size: .74rem; color: var(--text-2); }

        /* 글꼴 선택 카드 */
        .font-list { display: grid; gap: 8px; }
        .font-opt { position: relative; cursor: pointer; }
        .font-opt input { position: absolute; opacity: 0; pointer-events: none; }
        .font-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            border-radius: var(--r-input);
            background: var(--fill);
            border: 1px solid var(--line);
            transition: border-color .2s, background-color .2s;
        }
        .font-opt:hover .font-card { border-color: var(--line-2); }
        .font-sample { width: 84px; flex-shrink: 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
        .font-meta strong { display: block; font-size: .84rem; font-weight: 600; }
        .font-meta small { display: block; font-size: .73rem; color: var(--text-3); }
        .font-check { margin-left: auto; opacity: 0; color: var(--accent); transition: opacity .2s; }
        .font-opt input:checked + .font-card { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .08); }
        .font-opt input:checked + .font-card .font-check { opacity: 1; }
        .font-opt input:focus-visible + .font-card { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; }

        /* 파티클 선택 칩 */
        .chip-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
        .chip-opt { position: relative; cursor: pointer; }
        .chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
        .chip-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 7px;
            padding: 13px 4px 11px;
            border-radius: var(--r-input);
            background: var(--fill);
            border: 1px solid var(--line);
            font-size: .72rem;
            color: var(--text-3);
            transition: color .2s, border-color .2s, background-color .2s;
        }
        .chip-card i { font-size: 1rem; }
        .chip-opt:hover .chip-card { color: var(--text); }
        .chip-opt input:checked + .chip-card { color: var(--text); border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .1); }
        .chip-opt input:focus-visible + .chip-card { outline: 2px solid rgba(var(--accent-rgb), .9); outline-offset: 2px; }

        /* 이미지 업로드 드롭존 */
        .dropzone {
            position: relative;
            display: grid;
            place-items: center;
            aspect-ratio: 16 / 9;
            border-radius: var(--r-inner);
            border: 1.5px dashed rgba(255, 255, 255, .22);
            background: rgba(255, 255, 255, .03);
            overflow: hidden;
            cursor: pointer;
            transition: border-color .2s, background-color .2s;
        }
        .dropzone:hover, .dropzone.is-drag { border-color: rgba(var(--accent-rgb), .9); background: rgba(var(--accent-rgb), .07); }
        .dropzone.is-drag { border-style: solid; }
        .dropzone > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
        .dropzone:not(.has-image) > img { display: none; }
        .dz-empty { display: grid; justify-items: center; gap: 6px; padding: 16px; text-align: center; color: var(--text-2); pointer-events: none; }
        .dz-empty i { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 14px; background: var(--fill-2); font-size: 1.1rem; }
        .dz-empty strong { font-size: .84rem; font-weight: 600; }
        .dz-empty span { font-size: .74rem; color: var(--text-3); }
        .dropzone.has-image .dz-empty { display: none; }
        .dropzone.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 55%); pointer-events: none; }
        .dz-badge, .dz-change {
            position: absolute;
            bottom: 10px;
            z-index: 1;
            display: none;
            align-items: center;
            gap: .35rem;
            padding: .3rem .65rem;
            border-radius: 999px;
            font-size: .7rem;
            font-weight: 600;
            background: rgba(0, 0, 0, .45);
            border: 1px solid rgba(255, 255, 255, .2);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            pointer-events: none;
        }
        .dz-badge { left: 10px; }
        .dz-change { right: 10px; }
        .dropzone.has-image .dz-badge, .dropzone.has-image .dz-change { display: inline-flex; }
        .dz-busy { position: absolute; inset: 0; z-index: 2; display: none; place-items: center; background: rgba(0, 0, 0, .45); font-size: 1.2rem; }
        .dropzone.is-busy .dz-busy, .avatar-drop.is-busy .dz-busy { display: grid; }

        /* 프로필 사진 편집 */
        .avatar-editor { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: var(--r-inner); background: var(--fill); border: 1px solid var(--line); }
        .avatar-drop {
            position: relative;
            width: 84px;
            height: 84px;
            flex-shrink: 0;
            border-radius: 50%;
            overflow: hidden;
            cursor: pointer;
            background: #1d2026;
            box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .7), 0 10px 24px -10px rgba(0, 0, 0, .8);
            transition: box-shadow .2s;
        }
        html[data-avatar="rounded"] .avatar-drop { border-radius: 28%; }
        .avatar-drop img { width: 100%; height: 100%; object-fit: cover; }
        .avatar-drop.is-drag { box-shadow: 0 0 0 3px var(--accent), 0 0 0 8px rgba(var(--accent-rgb), .2); }
        .avatar-drop-overlay {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            background: rgba(0, 0, 0, .45);
            opacity: 0;
            font-size: 1.1rem;
            transition: opacity .2s;
            pointer-events: none;
        }
        .avatar-drop:hover .avatar-drop-overlay, .avatar-drop.is-drag .avatar-drop-overlay { opacity: 1; }
        .avatar-editor-body { min-width: 0; }
        .avatar-editor-body strong { display: block; font-size: .88rem; font-weight: 600; }
        .avatar-editor-body .hint { margin-top: 3px; }
        .inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

        .tag-preview { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }

        /* =====================================================================
           12. 토스트 / 푸터 / 애니메이션
           ===================================================================== */
        .toast {
            position: fixed;
            left: 50%;
            bottom: calc(24px + env(safe-area-inset-bottom));
            z-index: 90;
            display: flex;
            align-items: center;
            gap: .6rem;
            max-width: calc(100vw - 32px);
            padding: .8rem 1.15rem;
            border-radius: 999px;
            background: rgba(20, 22, 26, .88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, .14);
            box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7);
            font-size: .85rem;
            opacity: 0;
            transform: translate(-50%, 16px);
            pointer-events: none;
            transition: opacity .3s var(--ease), transform .4s var(--ease);
        }
        .toast.show { opacity: 1; transform: translate(-50%, 0); }
        .toast i { color: var(--success); }
        .toast.error i { color: var(--danger); }

        /* =====================================================================
           8B. 공개 템플릿 갤러리
           ===================================================================== */
        .templates-section {
            position: relative;
            z-index: 3;
            width: 100%;
            max-width: 1080px;
            margin: 0 auto;
            padding: 0 16px 112px;
            scroll-margin-top: 104px;
        }
        .templates-section .section-head { margin-bottom: 34px; }
        .templates-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
            gap: 22px;
        }
        .templates-grid > .empty { grid-column: 1 / -1; }
        .template-card {
            min-width: 0;
            overflow: hidden;
            border: 1px solid var(--line);
            border-radius: var(--r-card);
            background: rgba(255,255,255,.035);
            transition: transform .25s var(--ease), border-color .25s ease;
        }
        .template-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.28); }
        .template-visual {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 176px;
            margin: 9px 9px 0;
            overflow: hidden;
            border-radius: max(5px, calc(var(--r-card) - 10px));
            background: linear-gradient(135deg, #18202e, #342344);
            isolation: isolate;
        }
        .template-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
        .template-visual::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(5,8,14,.28), rgba(5,8,14,.78)); }
        .template-preview {
            display: flex;
            align-items: center;
            gap: 13px;
            width: min(88%, 310px);
            padding: 16px;
            border: 1px solid rgba(255,255,255,.24);
            border-radius: 16px;
            background: rgba(20,22,28,.55);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 12px 30px rgba(0,0,0,.22);
        }
        .template-preview-avatar { width: 48px; height: 48px; flex: 0 0 48px; border: 2px solid var(--template-accent, #fff); border-radius: 50%; object-fit: cover; background: #252a33; }
        .template-preview-lines { display: grid; flex: 1; gap: 7px; min-width: 0; }
        .template-preview-lines i { display: block; height: 7px; border-radius: 99px; background: rgba(255,255,255,.74); }
        .template-preview-lines i:nth-child(1) { width: 57%; height: 9px; }
        .template-preview-lines i:nth-child(2) { width: 90%; opacity: .48; }
        .template-preview-lines i:nth-child(3) { width: 68%; opacity: .3; }
        .template-layout-label { position: absolute; right: 11px; bottom: 10px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(0,0,0,.34); color: #fff; font-size: .65rem; font-weight: 700; backdrop-filter: blur(8px); }
        .template-card-body { display: flex; flex-direction: column; gap: 11px; padding: 17px 18px 18px; }
        .template-card-title { overflow: hidden; color: var(--text); font-size: 1rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
        .template-card-desc { min-height: 2.9em; color: var(--text-2); font-size: .8rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .template-author { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: .73rem; }
        .template-author img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #252a33; }
        .template-card-actions { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
        .template-card-actions .btn { flex: 1; }
        .template-card-actions .icon-btn { width: 36px; height: 36px; }

        /* 문의 */
        .contact-section {
            position: relative;
            z-index: 3;
            width: 100%;
            max-width: 1080px;
            margin: 0 auto;
            padding: 0 16px 76px;
            scroll-margin-top: 104px;
        }
        .contact-card { display: grid; justify-items: center; gap: 12px; padding: clamp(28px, 5vw, 52px) 22px; border-radius: var(--r-card); text-align: center; }
        .contact-card .eyebrow { margin-bottom: 0; }
        .contact-card .section-sub { max-width: 480px; line-height: 1.7; }
        .contact-developer { display: flex; align-items: center; gap: 11px; margin: 10px 0 3px; text-align: left; }
        .contact-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--on-accent); background: var(--accent); font-size: 1.1rem; }
        .contact-developer strong, .contact-developer span:not(.contact-avatar) { display: block; }
        .contact-developer strong { color: var(--text-3); font-size: .7rem; }
        .contact-developer div span { color: var(--text); font-size: .95rem; font-weight: 700; }
        .contact-discord { margin-top: 4px; }
        #projects, #templates, #contact { scroll-margin-top: 104px; }

        .site-footer {
            position: relative;
            z-index: 3;
            padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
            text-align: center;
            font-size: .74rem;
            color: var(--text-3);
            border-top: 1px solid var(--line);
            background: rgba(0, 0, 0, .18);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes shimmer { to { transform: translateX(100%); } }
        @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); }
            70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
            100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
        }


        /* UI 배치 선택 카드 */
        .layout-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
        .layout-option { position: relative; min-width: 0; cursor: pointer; }
        .layout-option > input { position: absolute; opacity: 0; pointer-events: none; }
        .layout-option-card {
            display: grid; gap: 8px; height: 100%; padding: 10px;
            border: 1px solid var(--line); border-radius: var(--r-input);
            background: var(--fill); transition: border-color .2s, background .2s, transform .2s;
        }
        .layout-option:hover .layout-option-card { transform: translateY(-2px); border-color: var(--line-2); }
        .layout-option input:checked + .layout-option-card { border-color: rgba(var(--accent-rgb), .8); background: rgba(var(--accent-rgb), .1); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .25); }
        .layout-option input:focus-visible + .layout-option-card { outline: 2px solid var(--accent); outline-offset: 2px; }
        .layout-option-card strong { font-size: .78rem; text-align: center; }
        .layout-option-card small { min-height: 2.3em; color: var(--text-3); font-size: .65rem; line-height: 1.45; text-align: center; }
        .layout-thumb { display: flex; align-items: center; justify-content: center; gap: 5px; height: 74px; padding: 8px; border-radius: 9px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
        .layout-thumb i, .layout-thumb b, .layout-thumb em { display: block; border-radius: 4px; background: rgba(255,255,255,.24); }
        .layout-thumb i { width: 20px; height: 20px; border-radius: 50%; background: rgba(var(--accent-rgb),.8); }
        .layout-thumb b { width: 32px; height: 28px; }
        .layout-thumb em { width: 12px; height: 28px; }
        .layout-thumb-center { flex-direction: column; gap: 4px; }
        .layout-thumb-center i { width: 18px; height: 18px; }
        .layout-thumb-center b { width: 55%; height: 8px; }
        .layout-thumb-center em { width: 76%; height: 5px; }
        .layout-thumb-split { justify-content: space-evenly; }
        .layout-thumb-split i { width: 20px; height: 20px; }
        .layout-thumb-split b { width: 38%; height: 42px; }
        .layout-thumb-split em { display: none; }
        .layout-thumb-wide { justify-content: flex-start; }
        .layout-thumb-wide i { width: 30px; height: 30px; }
        .layout-thumb-wide b { width: 46%; height: 33px; }
        .layout-thumb-wide em { width: 17%; height: 33px; }

        /* 페이지 배치 프리셋 */
        html[data-profile-align="left"]:not([data-page-layout="wide"]) .profile-card { text-align: left; }
        html[data-profile-align="left"]:not([data-page-layout="wide"]) .avatar,
        html[data-profile-align="left"]:not([data-page-layout="wide"]) .hero-mark { margin-left: 0; margin-right: auto; }
        html[data-profile-align="left"] .profile-meta,
        html[data-profile-align="left"] .social-row { justify-content: flex-start; }
        html[data-profile-align="left"] .status-pill { margin-left: 0; }

        html[data-page-layout="wide"] .hero { min-height: auto; padding: 112px 20px 38px; }
        html[data-page-layout="wide"] .profile-card {
            display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
            align-items: center; column-gap: 28px; row-gap: 8px;
            max-width: min(960px, 100%); text-align: left; padding: 34px;
        }
        html[data-page-layout="wide"] .hero-mark,
        html[data-page-layout="wide"] .avatar {
            grid-column: 1; grid-row: 1 / span 10; align-self: center; justify-self: center;
            margin: 0; width: var(--avatar-size, 108px); height: var(--avatar-size, 108px);
        }
        html[data-page-layout="wide"] .profile-name,
        html[data-page-layout="wide"] .profile-handle,
        html[data-page-layout="wide"] .profile-meta,
        html[data-page-layout="wide"] .status-pill,
        html[data-page-layout="wide"] .profile-bio,
        html[data-page-layout="wide"] .social-row,
        html[data-page-layout="wide"] .views-pill,
        html[data-page-layout="wide"] .hero-actions { grid-column: 2; }
        html[data-page-layout="wide"] .profile-meta,
        html[data-page-layout="wide"] .social-row { justify-content: flex-start; }
        html[data-page-layout="wide"] .status-pill { justify-self: start; margin-left: 0; }
        html[data-page-layout="wide"] .views-pill { justify-self: start; }
        html[data-page-layout="wide"] .hero-actions { width: 100%; }
        html[data-page-layout="wide"] .scroll-hint { display: none; }

        @media (min-width: 900px) {
            html[data-page-layout="split"] #page-content {
                display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
                grid-template-rows: auto; align-items: start; min-height: 100vh; column-gap: 0;
            }
            html[data-page-layout="split"] #page-content > .hero {
                grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 0;
                min-height: 100vh; padding: 104px 18px 56px;
            }
            html[data-page-layout="split"] .profile-card { max-width: 100%; padding: 30px 22px 24px; }
            html[data-page-layout="split"] #page-content > .projects {
                grid-column: 2; grid-row: 1; width: 100%; max-width: none;
                margin: 0; padding: 112px clamp(22px, 4vw, 64px) 72px; min-width: 0;
            }
            html[data-page-layout="split"] .section-head { text-align: left; margin-bottom: 32px; }
            html[data-page-layout="split"] #page-content > .templates-section,
            html[data-page-layout="split"] #page-content > .contact-section {
                grid-column: 2; width: 100%; max-width: none; margin: 0;
                padding-left: clamp(22px, 4vw, 64px); padding-right: clamp(22px, 4vw, 64px);
            }
            html[data-page-layout="split"] #page-content > .templates-section { grid-column: 2; padding-top: 8px; padding-bottom: 72px; }
            html[data-page-layout="split"] #page-content > .contact-section { grid-column: 2; padding-bottom: 64px; }
            html[data-page-layout="split"] #page-content > .site-footer { grid-column: 1 / -1; }
            html[data-page-layout="split"] .scroll-hint { display: none; }
        }

        /* =====================================================================
           13. 반응형 / 모션 감소
           ===================================================================== */
        @media (max-width: 640px) {
            html[data-page-layout="wide"] .hero { min-height: 100svh; padding: 104px 16px 88px; }
            html[data-page-layout="wide"] .profile-card { display: block; max-width: var(--profile-width, 440px); text-align: center; padding: 32px 22px 24px; }
            html[data-page-layout="wide"] .avatar,
            html[data-page-layout="wide"] .hero-mark { margin: 0 auto 20px; width: var(--avatar-size, 108px); height: var(--avatar-size, 108px); }
            html[data-page-layout="wide"] .profile-meta,
            html[data-page-layout="wide"] .social-row { justify-content: center; }
            html[data-page-layout="wide"] .status-pill,
            html[data-page-layout="wide"] .views-pill { justify-self: auto; margin-left: auto; margin-right: auto; }
            html[data-page-layout="wide"] .profile-name,
            html[data-page-layout="wide"] .profile-handle,
            html[data-page-layout="wide"] .profile-meta,
            html[data-page-layout="wide"] .status-pill,
            html[data-page-layout="wide"] .profile-bio,
            html[data-page-layout="wide"] .social-row,
            html[data-page-layout="wide"] .views-pill,
            html[data-page-layout="wide"] .hero-actions { grid-column: auto; }
            .layout-option-grid { grid-template-columns: 1fr; }
            .layout-option-card { grid-template-columns: 90px minmax(0,1fr); align-items: center; }
            .layout-option-card strong, .layout-option-card small { text-align: left; }
            .layout-option-card small { grid-column: 2; }
            .layout-thumb { grid-row: 1 / span 2; }
        }
        @media (max-width: 480px) {
            .topnav { top: 10px; padding: 0 10px; }
            .topnav-inner { height: 54px; padding: 0 8px 0 12px; gap: 4px; }
            .brand { gap: .35rem; font-size: .82rem; }
            .brand-mark { width: 27px; height: 27px; }
            .nav-links { gap: 9px; padding: 0 5px; }
            .nav-links a { font-size: .65rem; padding: 7px 0; }
            .nav-me span { display: none; }
            .nav-me { padding: 0 .3rem; }
            .profile-card { padding: 32px 22px 24px; }
            .profile-name { font-size: 1.6rem; }
            .card-body { padding: 18px 18px 18px; }
            .drawer-body, .modal-body { padding-left: 18px; padding-right: 18px; }
            .tabs { margin-left: 18px; margin-right: 18px; }
            .tab { flex-direction: column; gap: 2px; height: 46px; }
            .tab i { font-size: .78rem; }
            .tab span { font-size: .66rem; }
            .nav-edit span { display: none; }
            .nav-edit { width: 36px; padding: 0; }
            .nav-links { gap: 7px; }
            .nav-links a { font-size: .61rem; }
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
            html { scroll-behavior: auto; }
            .reveal { opacity: 1; filter: none; transform: none; }
        }


/* =====================================================================
   14. 전문가 모드 · 사용자 아이콘 · 커스텀 이미지 · 드래그 배치
   ===================================================================== */
.page-content { display: flex; flex-direction: column; min-width: 0; }
.page-content > [data-section-key] { order: 0; }
.profile-custom-image { width: 100%; max-height: 420px; object-fit: cover; margin-top: 18px; border-radius: var(--r-inner); border: 1px solid var(--line); }
.social-row a { overflow: hidden; }
.social-row a .custom-social-icon { width: 21px; height: 21px; object-fit: contain; border-radius: 5px; }
.social-icon-editor { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.social-icon-preview { width: 30px; height: 30px; object-fit: contain; padding: 3px; border-radius: 8px; background: var(--fill-2); border: 1px solid var(--line); }
.social-icon-preview[hidden] { display: none !important; }
.social-icon-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.expert-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 22px 0; padding: 14px 16px; border-radius: var(--r-input); border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(var(--accent-rgb),.09), rgba(255,255,255,.025)); }
.expert-mode-copy { min-width: 0; }
.expert-mode-copy strong { display: block; font-size: .86rem; }
.expert-mode-copy strong i { color: var(--accent); margin-right: 5px; }
.expert-mode-copy small { display: block; margin-top: 4px; color: var(--text-3); line-height: 1.5; font-size: .72rem; }
.expert-switch { flex-shrink: 0; }
.expert-tab:not([hidden]) { display: flex; }
.expert-intro-card { padding: 16px; border: 1px solid rgba(var(--accent-rgb),.26); border-radius: var(--r-inner); background: rgba(var(--accent-rgb),.055); }
.expert-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: var(--fill-2); color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .06em; }
.expert-intro-card h4 { margin-top: 12px; font-size: 1rem; }
.expert-intro-card p { margin-top: 7px; font-size: .82rem; line-height: 1.7; color: var(--text-2); }
.expert-intro-card p strong { color: var(--text); }
.expert-layout-list { display: grid; gap: 8px; }
.expert-layout-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--fill); cursor: grab; user-select: none; }
.expert-layout-item:active { cursor: grabbing; }
.expert-layout-item.is-dragging { opacity: .45; border-style: dashed; }
.expert-layout-item.is-over { border-color: var(--accent); background: rgba(var(--accent-rgb),.09); }
.expert-layout-item i { color: var(--text-3); }
.expert-layout-item strong { font-size: .83rem; }
.expert-layout-item small { margin-left: auto; color: var(--text-3); font-size: .68rem; }
.expert-code { min-height: 180px; font-family: var(--mono); font-size: .78rem; tab-size: 2; white-space: pre; }
.expert-upload-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--fill); }
.expert-image-preview { width: 76px; height: 60px; object-fit: cover; border-radius: 8px; }
.expert-image-preview[hidden] { display: none !important; }
.expert-upload-copy { min-width: 0; }
.expert-upload-copy strong { display: block; font-size: .82rem; }
.expert-upload-copy small { display: block; margin-top: 4px; color: var(--text-3); font-size: .7rem; }
.expert-note { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-input); background: var(--fill); color: var(--text-3); font-size: .72rem; line-height: 1.6; }
.expert-note i { color: var(--accent); margin-top: 2px; }
.expert-ad-modal { max-width: 470px; }
.expert-ad-body { text-align: center; padding-top: 30px; }
.expert-ad-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 20px; background: rgba(var(--accent-rgb),.12); color: var(--accent); font-size: 1.45rem; }
.expert-ad-once { color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .2em; }
.expert-ad-body h3 { margin-top: 8px; font-size: 1.28rem; }
.expert-ad-lead { margin: 10px auto 18px; color: var(--text-2); line-height: 1.7; font-size: .9rem; }
.expert-ad-lead strong { color: var(--text); }
.expert-ad-benefits { display: grid; gap: 9px; list-style: none; margin: 0 0 18px; padding: 14px; text-align: left; border-radius: var(--r-input); background: var(--fill); }
.expert-ad-benefits li { display: flex; align-items: flex-start; gap: 8px; font-size: .79rem; color: var(--text-2); }
.expert-ad-benefits i { color: var(--success); margin-top: 3px; }
.expert-ad-status:not(:empty) { margin-top: 8px; color: var(--danger); }
body.expert-ad-loading .expert-ad-modal { pointer-events: none; }

/* When the user saves a custom section order, disable preset split grid so order is respected. */
html[data-custom-order="true"] #page-content { display: flex !important; flex-direction: column !important; }
html[data-custom-order="true"] #page-content > [data-section-key] { width: 100%; max-width: none; margin-left: auto; margin-right: auto; }
html[data-custom-order="true"] .hero { min-height: 72vh; }
html[data-custom-order="true"] .projects { max-width: 1080px; }
html[data-custom-order="true"] .templates-section, html[data-custom-order="true"] .contact-section { max-width: 1080px; width: 100%; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .expert-mode-bar { margin-left: 18px; margin-right: 18px; }
  .expert-ad-modal { width: 100%; }
  .expert-ad-body h3 { font-size: 1.12rem; }
  .expert-layout-item { padding: 10px; }
}


/* MP4 background layer: sits above the static background and below the overlay */
#bg-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    filter: blur(var(--bg-blur));
    transform: scale(1.035);
    z-index: 0;
    pointer-events: none;
    background: #111315;
}
#bg-video[hidden] { display: none !important; }

/* Video preview inside the background upload dropzone */
#bg-drop-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}
#bg-drop-video[hidden] { display: none !important; }
.dropzone.has-video > img { display: none !important; }
.dropzone.has-video .dz-empty { display: none; }
.dropzone.has-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 55%);
    pointer-events: none;
}
.dropzone.has-video .dz-badge,
.dropzone.has-video .dz-change { display: inline-flex; }

/* =====================================================================
   15. Profile music player
   ===================================================================== */
.music-player {
    --music-accent: var(--accent);
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: 100%;
    margin: 20px auto 0;
    padding: 14px;
    border: 1px solid rgba(var(--accent-rgb), .22);
    border-radius: 18px;
    text-align: left;
    color: var(--text);
    overflow: hidden;
}
.music-player[hidden] { display: none !important; }
.music-player--glass {
    background: linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.035));
    box-shadow: 0 18px 44px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.music-player--minimal {
    background: rgba(0,0,0,.12);
    border-color: var(--line-2);
    border-radius: 12px;
    box-shadow: none;
    backdrop-filter: none;
}
.music-player--vinyl {
    background: linear-gradient(135deg, rgba(10,10,12,.94), rgba(35,35,42,.92));
    border-color: rgba(255,255,255,.14);
    color: #f7f7fa;
    box-shadow: 0 16px 40px rgba(0,0,0,.28);
}
.music-player-art {
    position: relative;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    overflow: hidden;
    color: var(--music-accent);
    background: color-mix(in srgb, var(--music-accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--music-accent) 34%, transparent);
    font-size: 1.08rem;
}
.music-player-art > span { display: none; }
.music-player--vinyl .music-player-art {
    border-radius: 50%;
    color: #f7f7fa;
    background: repeating-radial-gradient(circle, #25252b 0 2px, #111116 3px 5px);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 5px 16px rgba(0,0,0,.36);
}
.music-player--vinyl .music-player-art > i { position: relative; z-index: 2; }
.music-player--vinyl .music-player-art > span {
    display: block;
    position: absolute;
    width: 12px;
    height: 12px;
    border: 3px solid var(--music-accent);
    border-radius: 50%;
    background: #17171c;
}
.music-player-main { min-width: 0; display: grid; gap: 12px; }
.music-player-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.music-player-copy { min-width: 0; display: grid; gap: 3px; }
.music-player-eyebrow { color: var(--music-accent); font-size: .56rem; font-weight: 850; letter-spacing: .16em; line-height: 1.2; }
.music-player-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; font-weight: 750; line-height: 1.3; }
.music-player-status { min-height: 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: .64rem; line-height: 1.3; }
.music-player--vinyl .music-player-status { color: rgba(255,255,255,.58); }
.music-player-controls { display: flex; align-items: center; gap: 11px; }
.music-play-btn, .music-icon-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}
.music-play-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--music-accent); color: #101216; font-size: .76rem; }
.music-play-btn:hover, .music-icon-btn:hover { transform: scale(1.06); }
.music-icon-btn { width: 28px; height: 28px; border-radius: 8px; background: var(--fill); color: var(--text-2); font-size: .72rem; }
.music-player--vinyl .music-icon-btn { color: #fff; background: rgba(255,255,255,.1); }
.music-volume-group { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.music-volume {
    -webkit-appearance: none; appearance: none;
    width: 64px; height: 4px; margin: 0; padding: 0; border-radius: 999px; cursor: pointer; outline: none;
    background: linear-gradient(to right, var(--music-accent) var(--p, 70%), color-mix(in srgb, var(--text) 18%, transparent) var(--p, 70%));
}
.music-volume[hidden] { display: none; }
.music-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--music-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--music-accent) 18%, transparent); }
.music-volume::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--music-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--music-accent) 18%, transparent); }
.music-volume:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--music-accent) 40%, transparent); }
.music-volume-field { margin-top: 4px; }
.music-progress-wrap { min-width: 0; flex: 1; display: grid; gap: 4px; }
.music-progress-times { display: flex; justify-content: space-between; color: var(--text-3); font:  .61rem var(--mono); font-variant-numeric: tabular-nums; }
.music-player--vinyl .music-progress-times { color: rgba(255,255,255,.56); }
.music-progress {
    width: 100%;
    height: 4px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--line-2);
    cursor: pointer;
    accent-color: var(--music-accent);
}
.music-progress:disabled { cursor: default; opacity: .55; }
.music-progress::-webkit-slider-thumb { width: 10px; height: 10px; appearance: none; -webkit-appearance: none; border-radius: 50%; background: var(--music-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--music-accent) 18%, transparent); }
.music-progress::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--music-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--music-accent) 18%, transparent); }
.music-editor { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--fill); }
.music-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.music-editor-heading .label { display: block; }
.music-editor-heading .hint { margin-top: 5px; }
.music-editor-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: rgba(var(--accent-rgb),.12); color: var(--accent); }
.music-file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-input); background: rgba(0,0,0,.09); }
.music-file-info { min-width: 0; display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: .76rem; }
.music-file-info > i { color: var(--accent); }
.music-file-info > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-title-field { margin-top: 15px; }
.music-style-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.music-style-options label { min-width: 0; }
.music-style-options label span { justify-content: center; padding-left: 6px; padding-right: 6px; }
.music-color-input { width: 64px; height: 38px; padding: 4px; cursor: pointer; }
.music-autoplay-note { display: flex; gap: 8px; margin-top: 13px; color: var(--text-3); font-size: .69rem; line-height: 1.55; }
.music-autoplay-note i { color: var(--accent); margin-top: 2px; flex: 0 0 auto; }
@media (max-width: 480px) {
    .music-volume { width: 48px; }
    .music-player { grid-template-columns: 46px minmax(0,1fr); gap: 10px; padding: 11px; }
    .music-player-art { width: 46px; height: 46px; border-radius: 13px; }
    .music-file-row { align-items: flex-start; flex-direction: column; }
    .music-file-row .inline-actions { width: 100%; }
}
@media (min-width: 641px) {
    html[data-page-layout="wide"] .music-player { grid-column: 2; }
}
@media (max-width: 640px) {
    html[data-page-layout="wide"] .music-player { grid-column: auto; }
}
