        :root{
            --bg:#0b0c0f;
            --panel:#12131a;
            --panel-2:#161824;
            --text:#e7e8ee;
            --muted:#9aa0ad;
            --line:rgba(255,255,255,.08);
            --accent:#7c5cff;
            --accent-2:#24d39a;
            --radius-lg:14px;
            --radius-md:10px;
            --radius-xl:20px;
            --shadow:0 10px 40px rgba(0,0,0,.5);

            --link-blue:#5aa7ff;
            --icon-ring: rgba(255,255,255,.75);
        }

        *{box-sizing:border-box;}
        body{
            margin:0;
            font-family:system-ui,-apple-system,"Noto Sans KR",sans-serif;
            color:var(--text);

            /* ✅ 그라데이션은 ::before로 이동, body는 단색만 */
            background: var(--bg);

            /* ✅ fixed 배경 레이어를 깔기 위한 기준 */
            position: relative;

            min-height:100vh;
            display:flex;
            flex-direction:column;
        }
        /* ✅ 스크롤 길어져도 항상 이어지는 배경 레이어 */
        body::before{
            content:"";
            position: fixed;
            inset: 0;
            z-index: -1;

            background:
                    radial-gradient(900px 400px at 80% 0%, rgba(124,92,255,.2), transparent 60%),
                    radial-gradient(700px 350px at 10% 10%, rgba(36,211,154,.15), transparent 60%),
                    var(--bg);
        }

        main.container{ flex: 1; }

        .page-root{
            min-height:100vh;
            display:flex;
            flex-direction:column;
        }
        .page-root > main { flex: 1; }

        header{
            position:sticky; top:0; z-index:10;
            background:rgba(11,12,15,.85);
            backdrop-filter:blur(8px);
            border-bottom:1px solid var(--line);
        }

        .header-row{
            display:flex;
            align-items:center;
            justify-content:space-between;
            height:56px;
        }

        nav ul{
            display:flex; list-style:none; gap:18px;
            padding:0; margin:0;
            font-weight:600; color:var(--muted);
        }
        nav li.active{ color:var(--text); font-weight:700; }

        /* PROFILE SECTION */
        .profile-header{
            margin:30px 0 20px;
            display:flex; gap:28px; align-items:center;
        }
        .page-root.booting main{
            visibility:hidden;
        }
        .profile-photo{
            width:220px; height:300px; border-radius:var(--radius-lg);
            object-fit:cover; border:1px solid var(--line);
            box-shadow:var(--shadow);
        }
        .profile-info h1{
            font-size:34px;
            font-weight:900;
            margin:0 0 10px;
        }
        .profile-info .meta{
            font-size:14px;
            color:var(--muted);
            margin-bottom:8px;
        }
        .bio{
            font-size: 14px;
            color: var(--muted);
            line-height: 1.6;
        }

        .profile-title-row{
            display:flex;
            align-items:center;
            gap:8px;
            position:relative;
        }

        .profile-settings-btn{
            width:28px;
            height:28px;
            border-radius:999px;
            border:1px solid var(--line);
            background:rgba(255,255,255,0.06);
            display:flex;
            align-items:center;
            justify-content:center;
            cursor:pointer;
            font-size:14px;
            padding:0;
            transition:background .15s ease, transform .12s ease, border-color .15s ease;
        }
        .profile-settings-btn:hover{
            background:rgba(124,92,255,0.18);
            border-color:var(--accent);
            transform:translateY(-1px);
        }

        .profile-edit-overlay{
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.82);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            pointer-events: none;
            transition: opacity .2s ease;
        }
        .profile-edit-overlay.show{
            opacity: 1;
            pointer-events: auto;
        }
        .profile-edit-card{
            width: min(320px, 90vw);
            background: var(--panel-2);
            border-radius: var(--radius-xl);
            border: 1px solid var(--line);
            box-shadow: 0 20px 60px rgba(0,0,0,.85);
            padding: 14px 16px 10px;
        }
        .profile-edit-card .profile-settings-item{
            padding: 9px 10px;
            font-size: 13px;
        }
        .profile-edit-card .profile-settings-item + .profile-settings-item{
            border-top: 1px solid rgba(255,255,255,0.03);
        }

        .profile-settings-menu{
            position:absolute;
            top:110%;
            right:0;
            min-width:180px;
            background:var(--panel-2);
            border:1px solid var(--line);
            border-radius:var(--radius-md);
            box-shadow:0 12px 40px rgba(0,0,0,.6);
            padding:6px 0;
            display:none;
            z-index:20;
        }
        .profile-settings-menu.show{ display:block; }
        .profile-settings-item{
            width:100%;
            border:none;
            background:transparent;
            color:var(--text);
            text-align:left;
            font-size:13px;
            padding:8px 12px;
            cursor:pointer;
            display:flex;
            align-items:center;
            justify-content:space-between;
        }
        .profile-settings-item span{ pointer-events:none; }
        .profile-settings-item:hover{ background:rgba(124,92,255,0.16); }
        .profile-settings-item.close-item{ color:var(--muted); }

        /* EMPTY CTA */
        .empty-cta{
            margin-top: 14px;
            padding: 42px 0 36px;
            text-align:center;
            user-select:none;
        }
        .empty-cta-icon{
            display:inline-flex;
            align-items:center;
            justify-content:center;
            text-decoration:none;
            outline:none;
        }
        .empty-cta-ring{
            width:72px;
            height:72px;
            border-radius:999px;
            border:2px solid var(--icon-ring);
            display:flex;
            align-items:center;
            justify-content:center;
            background: rgba(255,255,255,0.03);
            transition: transform .14s ease, border-color .14s ease, background .14s ease;
        }
        .empty-cta-icon:hover .empty-cta-ring{
            transform: translateY(-2px);
            border-color: var(--link-blue);
            background: rgba(90,167,255,0.12);
        }

        .empty-cta svg{
            width:30px;
            height:30px;
            stroke: rgba(255,255,255,.92);
            fill: none;
            stroke-width: 1.8;
            transition: stroke .14s ease;
        }
        .empty-cta-icon:hover svg{
            stroke: var(--link-blue);
        }

        .empty-cta-title{
            margin-top: 18px;
            font-size: 28px;
            font-weight: 900;
            letter-spacing: -0.02em;
        }
        .empty-cta-desc{
            margin-top: 10px;
            font-size: 13px;
            color: var(--muted);
            line-height: 1.65;
        }
        .empty-cta-link{
            display:inline-block;
            margin-top: 14px;
            font-size: 14px;
            font-weight: 700;
            color: var(--link-blue);
            text-decoration:none;
        }
        .empty-cta-link:hover{
            text-decoration: underline;
        }

        /* ✅ 비소유자 empty: 클릭/호버 없는 안내용 */
        .empty-cta.view-only .empty-cta-icon{
            pointer-events:none;
            cursor:default;
        }
        .empty-cta.view-only .empty-cta-icon:hover .empty-cta-ring{
            transform:none;
            border-color: var(--icon-ring);
            background: rgba(255,255,255,0.03);
        }
        .empty-cta.view-only .empty-cta-link{
            display:none;
        }

        /* FILMOGRAPHY */
        .filmography-section h2{
            font-size:22px; font-weight:900; margin:40px 0 14px;
        }

        .film-slider-container{
            position:relative;
            margin-top:20px;
        }

        .film-slider-wrapper{
            position: relative;
            overflow:hidden;
        }

        .film-slider{
            display:flex;
            gap:20px;
            transition:transform .4s ease;
        }

        .film-card{
            flex: 0 0 32%;
            max-width: 32%;
            background:var(--panel);
            border:1px solid var(--line);
            border-radius:var(--radius-lg);
            overflow:hidden;
            cursor:pointer;
            transition:.15s;
            position:relative;
        }
        .film-card:hover{
            transform:scale(1.015);
            border-color:var(--accent);
        }
        .film-card-lock{
            position:absolute;
            right:10px;
            top:10px;
            width:26px;
            height:26px;
            border-radius:999px;
            background:rgba(0,0,0,.65);
            color:#e7e8ee;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:14px;
            pointer-events:none;
        }

        .film-poster-frame{
            width:100%;
            aspect-ratio:16/9;
            overflow:hidden;
            background:#0f1117;
            position:relative;
            line-height:0;
            border-radius:inherit;
        }
        .film-poster{
            width:100%;
            height:100%;
            object-fit:cover;
            display:block;
            position:absolute;
            inset:0;
            border-radius:inherit;
            transform:scale(1.02, 1.08);
            transform-origin:center;
        }
        .film-body{ padding:12px; }
        .film-title{ font-size:16px; font-weight:900; }
        .film-meta{ margin-top:6px; font-size:13px; color:var(--muted); }

        .film-arrow{
            position:absolute;
            top:50%;
            transform:translateY(-50%);
            border:none;
            background:transparent;
            color:white;
            font-size:48px;
            font-weight:300;
            cursor:pointer;
            display: none;
            transition:opacity .3s ease;
            z-index:10;
            padding:0 8px;
        }
        .film-slider-container:hover .film-arrow{ opacity:1; }
        .film-arrow.left{ left:-100px; }
        .film-arrow.right{ right:-100px; }
        .film-arrow:hover{
            color:var(--accent);
            transform:translateY(-50%) scale(1.1);
        }

        /* MOVIE POPUP */
        .movie-popup {
            position: fixed;
            z-index: 999;
            background: var(--panel-2);
            border-radius: 14px;
            border: 1px solid var(--line);
            box-shadow: 0 25px 70px rgba(0,0,0,.85);
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            transform-origin: center center;
            transition:
                    opacity .18s ease-out,
                    transform .22s cubic-bezier(.24,.82,.24,1.4);
        }

        .movie-popup.show{
            opacity:1;
            pointer-events:auto;
            transform:scale(1) translateY(0);
            filter:brightness(1);
        }

        .popup-video-box {
            position: relative;
            width: 100%;
            height: 60%;
            background: black;
            overflow: hidden;
            line-height: 0;
            font-size: 0;
            border-radius: inherit;
        }

        .popup-video-box video{
            position:absolute;
            inset:0;
            width:100%;
            height:100%;
            object-fit:cover;
            z-index:0;
            display:block;
            border-radius: inherit;
            transform:scale(1.02, 1.08);
            transform-origin:center;
        }

        .popup-video-box .popup-thumb{
            position:absolute;
            inset:0;
            width:100%;
            height:100%;
            object-fit:cover;
            z-index:1;
            transition: opacity .2s ease;
            opacity:1;
            display:block;
            border-radius: inherit;
            transform:scale(1.02, 1.08);
            transform-origin:center;
        }

        .popup-info{ padding: 14px 16px; }
        .popup-title{
            font-size:20px;
            font-weight:900;
            margin-bottom:6px;
            line-height: 1.25;
        }
        .popup-meta{
            font-size:13px;
            font-weight:500;
            color:var(--muted);
            margin-bottom:10px;
            display:flex;
            align-items:center;
            gap:6px;
        }
        .popup-age{
            background:rgba(255,0,0,.85);
            padding:4px 8px;
            border-radius:6px;
            font-size:12px;
            font-weight:800;
            color:white;
        }

        .popup-action-row {
            margin-top: 6px;
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .popup-mute-btn{
            position:absolute;
            bottom:10px;
            right:10px;
            width:42px;
            height:42px;
            border-radius:50%;
            display:flex;
            align-items:center;
            justify-content:center;
            background:rgba(0,0,0,.55);
            backdrop-filter:blur(6px);
            border:1px solid rgba(255,255,255,.35);
            color:white;
            font-size:20px;
            cursor:pointer;
            transition:background .2s ease, transform .2s ease;
            z-index:3;
        }
        .popup-mute-btn:hover{
            background:rgba(255,255,255,.25);
            transform:scale(1.12);
        }

        .popup-play-btn-circle,
        .popup-like-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: none;
            padding: 0;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 900;
            cursor: pointer;
            transition:
                    background .2s,
                    transform .2s cubic-bezier(.2,1.7,.6,1);
        }
        .popup-play-btn-circle{
            background: rgba(255,255,255,0.9);
            color: black;
        }
        .popup-play-btn-circle:hover {
            background: white;
            transform: scale(1.08);
        }

        .popup-like-btn {
            background: rgba(255,255,255,0.2);
            color: var(--text);
        }
        .popup-like-btn.liked {
            background: rgba(124,92,255,0.9);
            color: white;
            transform: scale(1.15);
        }
        .popup-like-btn:active { transform: scale(0.92); }

        /* GALLERY */
        .gallery-section h2{
            font-size:22px;
            font-weight:900;
            margin:40px 0 14px;
        }
        .gallery-grid{
            display:grid;
            grid-template-columns:repeat(3,1fr);
            gap:12px;
        }
        .gallery-grid > .empty-cta{
            grid-column: 1 / -1;
        }
        .gallery-item{
            width:100%;
            aspect-ratio:4/5;
            border-radius:var(--radius-lg);
            object-fit:cover;
            background:#0f1117;
            border:1px solid var(--line);
            transition: filter .18s ease, box-shadow .18s ease;
            outline: none;
        }
        .gallery-item-wrap{
            position:relative;
            width:100%;
            aspect-ratio:4/5;
            border-radius:var(--radius-lg);
            overflow:hidden;
        }
        .gallery-item-lock{
            position:absolute;
            right:8px;
            top:8px;
            display:flex;
            align-items:center;
            justify-content:center;
            width:26px;
            height:26px;
            border-radius:999px;
            background:rgba(0,0,0,.65);
            color:#e7e8ee;
            font-size:14px;
            pointer-events:none;
        }

        .gallery-item:hover{
            filter: brightness(0.6);
            box-shadow: 0 6px 16px rgba(0,0,0,.55);
            border-color: var(--line);
        }
        .gallery-item:focus { outline: none; }

        .gallery-spinner{
            width: 40px;
            height: 40px;
            margin: 20px auto 0;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .spinner-circle{
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 3px solid var(--muted);
            border-top-color: var(--accent);
            animation: gallery-spin .8s linear infinite;
        }
        @keyframes gallery-spin { to { transform: rotate(360deg); } }

        .gallery-lightbox-overlay{
            position:fixed;
            inset:0;
            background:rgba(0,0,0,.88);
            display:flex;
            align-items:center;
            justify-content:center;
            z-index:9999;
            opacity:0;
            pointer-events:none;
            transition:opacity .2s ease;
        }

        .gallery-lightbox-overlay.show{
            opacity:1;
            pointer-events:auto;
        }

        .gallery-lightbox-image{
            max-width:90vw;
            max-height:90vh;
            border-radius:var(--radius-lg);
            border:1px solid var(--line);
            box-shadow:0 18px 60px rgba(0,0,0,.9);
            display:block;
            cursor:zoom-out;
        }

        .gallery-lightbox-arrow{
            position:absolute;
            top:50%;
            transform:translateY(-50%);
            border:none;
            background:transparent;
            color:white;
            font-size:48px;
            font-weight:300;
            cursor:pointer;
            padding:0 12px;
            display:flex;
            align-items:center;
            justify-content:center;
            transition:opacity .3s ease, transform .2s ease, color .2s ease;
        }

        .gallery-lightbox-arrow.left{ left:40px; }
        .gallery-lightbox-arrow.right{ right:40px; }
        .gallery-lightbox-arrow:hover{
            color:var(--accent);
            transform:translateY(-50%) scale(1.1);
        }

        footer{
            margin-top:auto;
            padding:24px 0 30px;
            border-top:1px solid var(--line);
            text-align:center;
            font-size:12px;
            color:var(--muted);
        }

        .sns-row{
            margin-top: 10px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
            min-height: 34px;
        }
        .sns-separator{
            color: var(--muted);
            font-size: 12px;
            line-height: 1;
            user-select: none;
        }

        .sns-row.is-empty::before {
            content:"SNS를 추가해주세요.";
            color:var(--muted);
            font-size:13px;
        }

        .sns-pill{
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 0;
            border-radius: 0;
            background: transparent;
            border: none;
            font-size: 13px;
            color: var(--text);
            text-decoration: none;
        }
        .sns-pill:hover{ background: transparent; }

        .sns-badge{
            width:22px;
            height:22px;
            border-radius:999px;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            flex:0 0 auto;
        }

        .sns-icon{
            width:14px;
            height:14px;
            background:#fff;
            -webkit-mask: var(--sns-mask) center/contain no-repeat;
            mask: var(--sns-mask) center/contain no-repeat;
        }

        .sns-pill[data-brand="instagram"] .sns-badge{
            background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
        }
        .sns-pill[data-brand="instagram"] .sns-icon{ --sns-mask: url("../icons/instagram.svg"); }
        .sns-pill[data-brand="youtube"] .sns-badge{ background:#FF0000; }
        .sns-pill[data-brand="youtube"] .sns-icon{ --sns-mask: url("../icons/youtube.svg"); }
        .sns-pill[data-brand="tiktok"] .sns-badge{ background:#000000; }
        .sns-pill[data-brand="tiktok"] .sns-icon{ --sns-mask: url("../icons/tiktok.svg"); }
        .sns-pill[data-brand="etc"] .sns-badge{ background:#64748B; }
        .sns-pill[data-brand="etc"] .sns-icon{ --sns-mask: url("../icons/link.svg"); }

        .profile-tag-section{ margin-top: 14px; }
        .profile-tag-title{
            font-size: 12px;
            font-weight: 700;
            letter-spacing: .08em;
            text-transform: uppercase;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .profile-tag-list{
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            min-height:28px;
        }
        .profile-tag-list.is-empty::before{
            content:"태그를 추가해주세요. #주연 #드라마";
            color:var(--muted);
            font-size:13px;
        }

        .profile-tag{
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: rgba(124,92,255,0.14);
            border: 1px solid rgba(124,92,255,0.4);
            color: var(--text);
        }

        .logo{
            font-weight:800;
            font-size:18px;
            color:var(--text);
            text-decoration:none;
        }

        /* 로그인 오버레이 */
        .login-overlay{
            position:fixed;
            inset:0;
            background:rgba(0,0,0,.78);
            display:flex;
            align-items:center;
            justify-content:center;
            z-index:11000;
            opacity:0;
            pointer-events:none;
            transition:opacity .2s ease;
        }
        .login-overlay.show{
            opacity:1;
            pointer-events:auto;
        }

        .login-card{
            width:min(360px,92vw);
            background:var(--panel-2);
            border-radius:var(--radius-xl);
            border:1px solid var(--line);
            box-shadow:0 20px 60px rgba(0,0,0,.9);
            padding:20px 22px 18px;
        }

        .login-brand{
            font-size:20px;
            font-weight:800;
            text-align:center;
            margin-bottom:18px;
        }

        .login-label{
            display:block;
            font-size:13px;
            font-weight:600;
            color:var(--muted);
            margin:8px 0 6px;
        }

        .login-input{
            width:100%;
            padding:8px 10px;
            border-radius:10px;
            border:1px solid var(--line);
            background:rgba(0,0,0,.25);
            color:var(--text);
            font-size:13px;
            outline:none;
            transition:border-color .15s ease, background .15s ease;
        }
        .login-input::placeholder{ color:rgba(154,160,173,.7); }
        .login-input:focus{
            border-color:var(--accent);
            background:rgba(15,16,25,.95);
        }

        .login-submit-btn{
            margin-top:14px;
            width:100%;
            padding:9px 0;
            border-radius:999px;
            border:none;
            background:var(--accent);
            color:#fff;
            font-size:14px;
            font-weight:700;
            cursor:pointer;
            transition:background .15s ease, transform .12s ease;
        }
        .login-submit-btn:hover{
            background:#8a6dff;
            transform:translateY(-1px);
        }

        .login-divider{
            display:flex;
            align-items:center;
            gap:8px;
            margin:18px 0 12px;
            font-size:11px;
            color:var(--muted);
        }
        .login-divider-line{
            flex:1;
            height:1px;
            background:rgba(255,255,255,.14);
        }

        .social-row{
            display:flex;
            flex-direction:column;
            gap:8px;
        }
        .social-btn{
            width:100%;
            padding:8px 10px;
            border-radius:999px;
            border:none;
            font-size:13px;
            font-weight:600;
            cursor:pointer;
            display:flex;
            align-items:center;
            justify-content:center;
            gap:6px;
            transition:transform .12s ease, box-shadow .12s ease, background .15s ease;
        }
        .social-btn:hover{
            transform:translateY(-1px);
            box-shadow:0 6px 18px rgba(0,0,0,.55);
        }
        .social-google{ background:#ffffff; color:#111111; }
        .social-naver{ background:#03c75a; color:#ffffff; }

        .login-links{
            margin-top:8px;
            font-size:11px;
            display:flex;
            justify-content:center;
            align-items:center;
            gap:10px;
            color:var(--muted);
        }

        .login-links a{
            color:var(--muted);
            text-decoration:none;
        }
        .login-links a:hover{
            color:var(--text);
            text-decoration:underline;
        }

        html{
            scrollbar-gutter: stable;
            height: 100%;
        }

        .hidden{ display:none !important; }

        .profile-header.is-empty{ align-items:flex-start; }
        .profile-header.is-empty .profile-photo{
            filter:saturate(.9) brightness(.95);
            opacity:.92;
        }

        /* ✅ 갤러리 empty가 grid 전체를 차지하도록 유지 */
        #galleryGrid #galleryEmpty{ grid-column: 1 / -1; }

        /* ✅ owner-only: “숨김이지만 공간 유지” */
        .owner-only.hidden-keep-space{
            visibility:hidden;
            pointer-events:none;
        }
