/* ============================================================
   jh84.me | 나를+ 글로벌 스타일시트 (Mobile-First)
   Design: Blue(Primary) + Green(Secondary), max-width 840px
   ============================================================ */

/* ── Reset & Variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:         #007aff;
    --blue-dark:    #005ecb;
    --green:        #34c759;
    --green-dark:   #248a3d;
    --red:          #ff3b30;
    --gray-100:     #f8f9fa;
    --gray-200:     #f5f5f7;
    --gray-300:     #e5e5ea;
    --gray-400:     #d2d2d7;
    --gray-500:     #aeaeb2;
    --gray-50:      #fafafa;
    --gray-600:     #6e6e73;
    --gray-700:     #636366;
    --gray-800:     #2d2d2d;
    --gray-900:     #1d1d1f;
    --white:        #ffffff;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
    --radius-xl:    24px;
    --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.13);
    --transition:   all .25s cubic-bezier(.4,0,.2,1);
    --blue-tint:    #f4f7ff;
    --blue-light:   #eef4ff;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-200);
    color: var(--gray-900);
    min-height: 100vh;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── 공통 레이아웃 ──────────────────────────────────────── */
.container {
    max-width: 840px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ── 카드 ───────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.card + .card { margin-top: 16px; }

/* ── 플러스 로고 (리뉴얼 v2) ──────────────────────────────── */
.plus-logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.plus-logo {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4a9fff 0%, #007aff 50%, #0055d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 16px rgba(0, 122, 255, .30),
        0 1px 3px rgba(0, 0, 0, .08),
        inset 0 1px 0 rgba(255, 255, 255, .25);
    animation: plusPulse 3s ease-in-out infinite;
    cursor: default;
    user-select: none;
    transition: transform .2s, box-shadow .2s;
}
.plus-logo::before {
    content: '+';
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
/* 글로우 링 */
.plus-logo::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(74, 159, 255, .4), rgba(0, 85, 212, .1));
    z-index: -1;
    animation: glowRing 3s ease-in-out infinite;
    pointer-events: none;
}
/* 로고 (비링크 — 호버 효과 제거) */

/* 사이트명 (로고 옆 텍스트) */
.site-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.site-name-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.site-name-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: .02em;
    line-height: 1.2;
}

/* 로그인 페이지 큰 로고 */
.plus-logo-lg .plus-logo {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    animation: plusPulseLg 3s ease-in-out infinite;
}
.plus-logo-lg .plus-logo::before {
    font-size: 44px;
}
.plus-logo-lg .plus-logo::after {
    inset: -6px;
    border-radius: 28px;
}

/* Beta 뱃지 */
.badge-beta {
    position: absolute;
    top: -6px;
    right: -12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(238, 90, 36, .35);
    text-transform: uppercase;
    z-index: 1;
    animation: betaPop 3s ease-in-out infinite;
}
.plus-logo-lg .badge-beta {
    top: -8px;
    right: -16px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
}

/* ── 로고 키프레임 ──────────────────────────────────────────── */
@keyframes plusPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-4px) scale(1.03); }
}
@keyframes plusPulseLg {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.04); }
}
@keyframes glowRing {
    0%, 100% { opacity: .4; transform: scale(1); }
    50%      { opacity: .8; transform: scale(1.06); }
}
@keyframes betaPop {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* ── 버튼 ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary  { background: var(--blue);  color: var(--white); }
.btn-primary:hover:not(:disabled)  { background: var(--blue-dark); }

.btn-green    { background: var(--green); color: var(--white); }
.btn-green:hover:not(:disabled)    { background: var(--green-dark); }

.btn-danger   { background: var(--red);   color: var(--white); }
.btn-danger:hover:not(:disabled)   { background: #c82020; }

.btn-outline  {
    background: transparent;
    color: var(--blue);
    border: 1.5px solid var(--blue);
}
.btn-outline:hover:not(:disabled) { background: var(--blue); color: var(--white); }

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
}
.btn-ghost:hover { color: var(--gray-900); background: var(--gray-200); }

.btn-full { width: 100%; }

/* ── 뱃지 (난이도) ──────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
}
.badge-easy   { background: #d1f5d3; color: #1a7f37; }
.badge-medium { background: #fff3cd; color: #856404; }
.badge-hard   { background: #fde8e8; color: #c0392b; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }

/* ── 헥사곤 목표 아이콘 ──────────────────────────────────── */
.hexagon-wrap {
    position: relative;
    width: 126px;
    height: 126px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 그라디언트 테두리 링 (::before = 바깥 헥사곤) */
.hexagon-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    background: linear-gradient(135deg, var(--blue), var(--green));
    z-index: 0;
}
.hexagon {
    position: relative;
    z-index: 1;
    width: 112px;
    height: 112px;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    background: linear-gradient(135deg, #e8f0fe, #cfe8ff);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hexagon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hexagon .hexagon-placeholder {
    font-size: 40px;
    color: var(--blue);
}

/* ── 입력 폼 ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,122,255,.15);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* 난이도 라디오 그룹 */
.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.radio-item {
    flex: 1;
    position: relative;
}
.radio-item input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-label {
    display: block;
    text-align: center;
    padding: 11px 8px;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-700);
}
.radio-item input:checked + .radio-label {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

/* ── 공용 회전 keyframe ──────────────────────────────────── */
@keyframes spin-cw { to { transform: rotate(360deg); } }

/* ── 목표 목록 아이템 ────────────────────────────────────── */
.goal-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-400);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}
.goal-item:hover { box-shadow: var(--shadow-md); border-color: var(--blue); transform: translateY(-2px); }
.goal-item + .goal-item { margin-top: 12px; }

.goal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.goal-item-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
    line-height: 1.4;
}
.goal-item-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.progress-bar-wrap {
    background: var(--gray-300);
    border-radius: 99px;
    height: 6px;
    margin-top: 12px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: 99px;
    background: var(--blue);
    transition: width .4s ease;
}

/* ── 추천 목표 섹션 ──────────────────────────────────────── */
.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.recommend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.recommend-item:hover { border-color: var(--green); background: #f0fdf4; }
.recommend-item + .recommend-item { margin-top: 8px; }
.recommend-icon {
    width: 36px;
    height: 36px;
    background: var(--green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}
.recommend-text { font-size: 14px; font-weight: 500; }

/* ── 세부 계획 아이템 (title + detail + collapse) ────────── */
.plan-item {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--white);
    transition: border-color 0.25s, background 0.25s;
}
.plan-item:last-child { margin-bottom: 0; }
.plan-item.done {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

/* 헤더 (체크박스 + 제목 + 완료일) */
.plan-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}
.plan-title-wrap { flex: 1; min-width: 0; }
.plan-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.45;
    word-break: keep-all;
}
.plan-item.done .plan-title {
    text-decoration: line-through;
    color: var(--gray-400);
    font-weight: 600;
}
.plan-done-date {
    font-size: 11.5px;
    color: var(--green);
    margin-top: 3px;
    font-weight: 500;
}

/* 체크박스 */
.plan-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: var(--transition);
}
.plan-check:checked {
    background: var(--blue);
    border-color: var(--blue);
}
.plan-check:checked::after {
    content: '';
    position: absolute;
    left: 5px; top: 2px;
    width: 7px; height: 12px;
    border: 2px solid var(--white);
    border-top: none; border-left: none;
    transform: rotate(45deg);
}

/* 상세 내용 — 기본 열림, 완료 시 닫힘 */
.plan-detail {
    max-height: 900px;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.3s ease;
    opacity: 1;
}
.plan-detail.collapsed {
    max-height: 0;
    opacity: 0;
}
.plan-detail-inner {
    margin: 0 16px 10px 50px;
    padding: 10px 14px;
    background: var(--blue-tint);
    border-left: 3px solid var(--blue);
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    color: var(--gray-700);
    line-height: 1.75;
}
.plan-item.done .plan-detail-inner {
    background: var(--gray-100);
    border-left-color: var(--gray-300);
    color: var(--gray-500);
}

/* ── 세부계획 코드 블록 (Gemini 실제 스타일 — #f0f4f9 라이트) ──── */
.plan-code-block {
    margin: 0 16px 14px 50px;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    background: #f0f4f9;
    box-shadow: none;
}
.pcb-lang {
    background: #f0f4f9;
    color: #5f6368;
    font-size: 11.5px;
    font-family: 'Google Sans Mono', 'SF Mono', 'Fira Code', 'Courier New', monospace;
    padding: 4px 4px 4px 16px;
    letter-spacing: 0.01em;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
    box-sizing: border-box;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(68,71,70,.1);
}
.pcb-copy-btn {
    background: transparent;
    border: none;
    color: #444746;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}
.pcb-copy-btn:hover {
    background: rgba(68,71,70,.1);
    color: #1f1f1f;
    opacity: 1;
}
.pcb-copy-btn.copied {
    color: #188038;
    opacity: 1;
}
.plan-code-block pre {
    margin: 0;
    padding: 12px 16px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #f0f4f9;
    border-radius: 0 0 12px 12px;
}
.plan-code-block code {
    font-family: 'Google Sans Mono', 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5rem;
    color: #444746;
    white-space: pre;
    display: block;
}
/* SQL 구문 하이라이팅 — Gemini 실제 --bard-color-code-* 값 */
.plan-code-block code .kw  { color: #8430ce; font-weight: 500; } /* hljs-keyword  : #8430ce */
.plan-code-block code .fn  { color: #1967d2; }                   /* hljs-built_in  : #1967d2 */
.plan-code-block code .str { color: #188038; }                   /* hljs-string    : #188038 */
.plan-code-block code .num { color: #b55908; }                   /* hljs-literal   : #b55908 */
.plan-code-block code .cmt { color: #5f6368; font-style: italic; }/* hljs-comment  : #5f6368 */
.plan-code-block code .op  { color: #d93025; }                   /* hljs-variable  : #d93025 */
/* 완료 상태 코드블록은 살짝 흐리게 */
.plan-item.done .plan-code-block { opacity: 0.55; }

/* ── AI 챗봇 플로팅 버튼 (말풍선 형태) ───────────────────── */
.chat-float-btn {
    position: fixed;
    bottom: 28px;
    right: 20px;
    width: 62px;
    height: 56px;
    background: linear-gradient(145deg, var(--blue), var(--blue-dark));
    color: var(--white);
    border-radius: 20px 20px 4px 20px;   /* 말풍선 꼬리 */
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 100, 255, 0.38);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 800;
}
/* 말풍선 꼬리 삼각형 */
.chat-float-btn::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 8px;
    border: 9px solid transparent;
    border-top-color: var(--blue-dark);
    border-right: 0;
    border-bottom: 0;
}
.chat-float-btn:hover {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 100, 255, 0.5);
}
/* 버튼 안 아이콘 · 텍스트 */
.cfb-icon  { font-size: 20px; line-height: 1; }
.cfb-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
    opacity: 0.92;
}

/* ── 목표 포기 버튼 (캐주얼 블루 고스트) ─────────────────── */
.btn-trash {
    background: transparent;
    color: #7da8e8;
    border: 1.5px solid #cddeff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-trash:hover:not(:disabled) {
    background: var(--blue-light);
    color: var(--blue);
    border-color: #a4c3ff;
}

/* ── AI 타이핑 커서 ─────────────────────────────────────── */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--blue);
    border-radius: 1px;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.65s step-end infinite;
}
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── 로딩 말풍선 점 3개 ─────────────────────────────────── */
.loading-bubble {
    display: flex !important;
    align-items: center;
    gap: 5px;
    padding: 10px 16px !important;
    min-width: 60px;
}
.loading-bubble .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: dot-rise 1.3s ease-in-out infinite;
}
.loading-bubble .dot:nth-child(2) { animation-delay: 0.18s; }
.loading-bubble .dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot-rise {
    0%, 60%, 100% { transform: translateY(0);    opacity: 0.45; }
    30%            { transform: translateY(-7px); opacity: 1;    }
}

/* ── 완료 팝업 & 폭죽 ────────────────────────────────────── */
.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}
.complete-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
}
.complete-modal.hidden { display: none; }
.complete-modal-inner {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.complete-modal-inner h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.complete-modal-inner p  { font-size: 15px; color: var(--gray-700); margin-bottom: 24px; }

/* ── 페이지 헤더 ─────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 10px;
}
.page-header h1 { font-size: 22px; font-weight: 800; }
.back-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── 로그인 페이지 ───────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white);
    gap: 12px;
    padding: 40px 20px;
}
.login-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--gray-900);
    margin-top: 8px;
}
.login-sub {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.google-login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border: 1.5px solid var(--gray-400);
    border-radius: 40px;
    background: var(--white);
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}
.google-login-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.google-icon { width: 20px; height: 20px; }

/* ── 완료 상태 Read-Only 표시 ─────────────────────────────── */
.completed-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 16px;
}

/* ── 무한스크롤 로딩 ─────────────────────────────────────── */
#scroll-loader {
    text-align: center;
    padding: 20px;
    color: var(--gray-500);
    font-size: 14px;
}
#scroll-loader.hidden { display: none; }

/* ── 빈 목표 안내 ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; line-height: 1.6; }

/* ── 구분선 ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-300); margin: 20px 0; }

/* ── 섹션 헤더 ──────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.section-header h2 { font-size: 18px; font-weight: 700; }

/* ── 목표 완료 처리 로딩 오버레이 ───────────────────────── */
.goal-complete-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.goal-complete-loading.hidden { display: none; }

.gcl-card {
    background: #fff;
    border-radius: 28px;
    padding: 44px 36px 40px;
    text-align: center;
    width: min(320px, 88vw);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* 아이콘 영역 */
.gcl-icon-wrap {
    position: relative;
    width: 108px;
    height: 108px;
    margin: 0 auto 28px;
}

/* 회전 링 1 (파란색) */
.gcl-ring1 {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    animation: spin-cw 1.1s linear infinite;
}
/* 회전 링 2 (초록색, 반대 방향) */
.gcl-ring2 {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--green);
    border-left-color: var(--green);
    animation: spin-cw 1.6s linear infinite reverse;
}

/* 트로피 이모지 - 위아래 부유 */
.gcl-trophy {
    position: absolute;
    inset: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    animation: gcl-float 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 200, 50, 0.5));
}

@keyframes gcl-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-7px) scale(1.1); }
}

/* 별 파티클 (4개) */
.gcl-stars {
    position: absolute;
    inset: -8px;
    pointer-events: none;
}
.gcl-stars span {
    position: absolute;
    font-size: 14px;
    animation: gcl-orbit 3s linear infinite;
    opacity: 0.8;
}
.gcl-stars span:nth-child(1) { animation-delay: 0s;    top: 0;   left: 50%; }
.gcl-stars span:nth-child(2) { animation-delay: 0.75s; top: 50%; right: 0; }
.gcl-stars span:nth-child(3) { animation-delay: 1.5s;  bottom: 0; left: 50%; }
.gcl-stars span:nth-child(4) { animation-delay: 2.25s; top: 50%; left: 0; }
@keyframes gcl-orbit {
    0%   { opacity: 0; transform: scale(0.5); }
    20%  { opacity: 1; transform: scale(1.2); }
    80%  { opacity: 1; transform: scale(1.0); }
    100% { opacity: 0; transform: scale(0.5); }
}

.gcl-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 10px;
}

/* 페이드 전환되는 상태 메시지 */
.gcl-status {
    font-size: 13.5px;
    color: var(--gray-500);
    min-height: 42px;
    line-height: 1.6;
    transition: opacity 0.4s ease;
}
.gcl-status.fade-out { opacity: 0; }

/* 점 3개 순차 바운스 */
.gcl-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
}
.gcl-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--blue);
    animation: gcl-bounce 1.3s ease-in-out infinite;
}
.gcl-dots span:nth-child(2) { animation-delay: 0.22s; background: var(--green); }
.gcl-dots span:nth-child(3) { animation-delay: 0.44s; }
@keyframes gcl-bounce {
    0%, 75%, 100% { transform: translateY(0);   opacity: 0.45; }
    38%            { transform: translateY(-11px); opacity: 1;    }
}

/* ── 목표 생성 AI 작업 로딩 오버레이 (gcg-) ────────────── */
.goal-create-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.goal-create-loading.hidden { display: none; }

.gcg-card {
    background: #fff;
    border-radius: 28px;
    padding: 40px 32px 34px;
    text-align: center;
    width: min(340px, 90vw);
    box-shadow: 0 24px 64px rgba(0,0,0,.38);
}

/* 아이콘 + 링 */
.gcg-icon-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}
.gcg-ring1 {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3.5px solid transparent;
    border-top-color: var(--blue);
    border-left-color: var(--blue);
    animation: spin-cw 1.3s linear infinite;
}
.gcg-ring2 {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--green);
    border-right-color: var(--green);
    animation: spin-cw 1.9s linear infinite reverse;
}
.gcg-emoji {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: gcg-pulse 2.5s ease-in-out infinite;
}
@keyframes gcg-pulse {
    0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0 transparent); }
    50%       { transform: scale(1.13); filter: drop-shadow(0 0 12px rgba(0,122,255,.4)); }
}

.gcg-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.gcg-status {
    font-size: 13.5px;
    color: var(--gray-500);
    min-height: 42px;
    line-height: 1.6;
    transition: opacity 0.35s ease;
}
.gcg-status.fade-out { opacity: 0; }

/* 애니메이션 진행 바 */
.gcg-progress-track {
    height: 5px;
    background: var(--gray-300);
    border-radius: 99px;
    margin: 18px 0 6px;
    overflow: hidden;
}
.gcg-progress-bar {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    width: 0%;
    transition: width 0.7s cubic-bezier(.4,0,.2,1);
}
.gcg-time {
    font-size: 11.5px;
    color: var(--gray-400);
}

/* ── v2.0 블록 타입별 스타일 ───────────────────────────── */

/* video 블록 */
.plan-block-video { margin: 10px 0 14px; }
.pbv-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.pbv-desc  { font-weight: 400; color: var(--gray-500); }
.pbv-frame-wrap {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}
.pbv-frame-wrap iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: none;
}

/* file 블록 */
.plan-block-file {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin: 8px 0;
    background: #fff;
}
.pbf-icon {
    flex-shrink: 0; width: 40px; height: 40px;
    border-radius: 8px; color: #fff;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.pbf-info { flex: 1; min-width: 0; }
.pbf-name { font-size: 14px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbf-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.pbf-dl {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--blue); color: #fff;
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}

/* link 블록 */
.plan-block-link {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin: 8px 0;
    text-decoration: none;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.plan-block-link:hover { border-color: var(--blue); background: var(--blue-tint); }

/* image 블록 */
.plan-block-image {
    margin: 10px 0 14px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
}
.plan-block-image img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 360px;
}
.pbi-caption {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    border-top: 1px solid var(--gray-200);
    background: #fff;
}
.pbl-icon  { font-size: 18px; flex-shrink: 0; }
.pbl-body  { flex: 1; min-width: 0; }
.pbl-title { font-size: 14px; font-weight: 600; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbl-desc  { font-size: 12px; color: var(--gray-700); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbl-domain { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.pbl-arrow { color: var(--gray-400); font-size: 14px; flex-shrink: 0; }

/* table 블록 */
.plan-block-table-wrap {
    overflow-x: auto; margin: 8px 0;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gray-200);
}
.plan-block-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-block-table th {
    background: var(--blue-tint); color: var(--gray-900);
    font-weight: 700; padding: 8px 12px;
    text-align: left; border-bottom: 1.5px solid var(--gray-200);
    white-space: nowrap;
}
.plan-block-table td { padding: 8px 12px; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
.plan-block-table tr:last-child td { border-bottom: none; }

/* ── 반응형 ─────────────────────────────────────────────── */
@media (max-width: 420px) {
    body { padding: 0; }
    .container { padding: 14px 12px 40px; }
    .plus-logo { width: 48px; height: 48px; border-radius: 14px; }
    .plus-logo::before { font-size: 28px; }
    .plus-logo-lg .plus-logo { width: 68px; height: 68px; border-radius: 18px; }
    .plus-logo-lg .plus-logo::before { font-size: 38px; }
    .login-title { font-size: 1.8rem; }
    .chat-float-btn { bottom: 20px; right: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   v3.0 Skill 빌더 전용 스타일
   ═══════════════════════════════════════════════════════════ */

/* ── 컨테이너 와이드 모드 (Skill 상세) ─────────────────────── */
.container-wide { max-width: 840px; }

/* ── 이모지 (공통) ──────────────────────────────────────── */
.skill-emoji { line-height: 1; }

/* ── Skill 상세 헤더 ─────────────────────────────────────── */
.skill-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.skill-detail-header .hexagon-wrap {
    width: 52px;
    height: 52px;
    margin: 0;
    flex-shrink: 0;
}
.skill-detail-header .hexagon-wrap::before { display: none; }
.skill-detail-header .hexagon {
    width: 52px;
    height: 52px;
    clip-path: none;
    border-radius: 13px;
    background: linear-gradient(145deg, #eaf1ff, #dce6fa);
}
.skill-detail-header .skill-emoji {
    font-size: 26px;
}
.skill-detail-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 4px;
    line-height: 1.3;
}
.skill-detail-info { flex: 1; min-width: 0; }

/* ── AI 패널 ─────────────────────────────────────────────── */
.ai-panel {
    background: var(--blue-tint);
    border: 1.5px solid var(--blue);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 24px;
}
.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 4px;
}
#btn-ai-toggle {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
#btn-ai-toggle:hover { background: #2563eb; }
#btn-ai-toggle.running { background: var(--gray-500); }
.ai-steps {
    display: flex;
    gap: 8px;
    margin: 12px 0 8px;
    flex-wrap: wrap;
}
.ai-step {
    padding: 4px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
}
.ai-step.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.ai-output {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--gray-800);
    max-height: 320px;
    overflow-y: auto;
    margin: 12px 0 8px;
}
.ai-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ── 에디터 툴바 ──────────────────────────────────────────── */
.editor-toolbar {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* ── Editor.js 래퍼 ─────────────────────────────────────── */
.editor-wrap {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 200px;
    background: #fff;
    overflow: visible;
    transition: border-color 0.2s;
}
.editor-wrap.editing {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}
/* Editor.js 내부 overflow 강제 해제 (툴바 짤림 방지) */
.editor-wrap .codex-editor,
.editor-wrap .codex-editor__redactor {
    overflow: visible !important;
}
.codex-editor__redactor { padding-bottom: 40px !important; }

/* ── 버튼 사이즈 추가 ────────────────────────────────────── */
.btn-sm   { padding: 5px 12px; font-size: 12px; }
/* ── 타임라인 (버전 이력) ────────────────────────────────── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 2px;
    background: var(--gray-200);
}
.timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.timeline-dot {
    position: absolute;
    left: -20px; top: 4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--gray-300);
}
.dot-major { background: #e53e3e; box-shadow: 0 0 0 2px #e53e3e; }
.dot-minor { background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.timeline-content {
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}
.timeline-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.timeline-summary {
    font-size: 13px;
    color: var(--gray-600);
    margin: 4px 0 0;
}

/* ── 로딩 오버레이 ───────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ── v3.0 반응형 ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .skill-detail-header { gap: 12px; }
    .container-wide { padding-left: 14px; padding-right: 14px; }
}


/* ============================================================
   v4.0 추가 스타일
   ============================================================ */

/* Editor.js content 좌측 정렬 통일 */
.editor-wrap .ce-block__content,
.editor-wrap .ce-toolbar__content {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── #1 상태 뱃지 ────────────────────────────────────────── */
.badge-draft {
    background: #fef9e7;
    color: #f59f00;
    border: 1px solid #f59f00;
}
.badge-done {
    background: #f0fff4;
    color: var(--green-dark);
    border: 1px solid var(--green);
}

/* ── #1 액션 버튼 영역 ───────────────────────────────────── */
.action-bar {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── 폼 힌트 ────────────────────────────────────────────── */
.form-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── #1 버전 메모 텍스트 ─────────────────────────────────── */
.version-memo {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: 4px;
}

/* ── #1 다운로드 select + 버튼 ───────────────────────────── */
.download-group {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}
.ver-format {
    padding: 5px 10px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    outline: none;
    color: var(--gray-900);
}
.ver-format:focus {
    border-color: var(--blue);
}

/* ── 버전 토글 버튼 & 내용 미리보기 ───────────────────── */
.ver-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.ver-toggle-btn:hover .badge {
    opacity: .8;
}
.ver-toggle-arrow {
    color: var(--gray-400);
    transition: transform .2s;
    flex-shrink: 0;
}
.ver-toggle-arrow.open {
    transform: rotate(180deg);
}
.ver-content-preview {
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    animation: fadeInUp .15s;
}
.ver-content-body {
    font-size: 13px;
    line-height: 1.75;
    color: var(--gray-800);
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}
.ver-content-body h1 { font-size: 1.3em; margin: 0 0 8px; }
.ver-content-body h2 { font-size: 1.1em; margin: 16px 0 6px; border-bottom: 1px solid var(--gray-200); padding-bottom: 4px; }
.ver-content-body h3 { font-size: 1em; margin: 12px 0 4px; }
.ver-content-body p { margin: 6px 0; }
.ver-content-body ul, .ver-content-body ol { padding-left: 20px; margin: 6px 0; }
.ver-content-body li { margin: 2px 0; }
.ver-content-body pre { background: #f4f4f4; padding: 10px 14px; border-radius: 6px; overflow-x: auto; font-size: .88em; margin: 8px 0; }
.ver-content-body code { background: #f0f0f0; padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.ver-content-body pre code { background: none; padding: 0; }
.ver-content-body blockquote { border-left: 3px solid var(--blue); margin: 8px 0; padding: 6px 14px; color: var(--gray-600); background: var(--blue-light); border-radius: 0 4px 4px 0; }

/* ── #2 화이트리스트 토글 카드 ───────────────────────────── */
.wl-mode-card {
    background: var(--blue-light);
    border: 1.5px solid var(--blue);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.wl-mode-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}
.wl-mode-desc {
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 12px;
}
.wl-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wl-toggle-label {
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 500;
}
/* iOS 스타일 토글 스위치 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-400);
    border-radius: 28px;
    transition: .3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--blue); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Work 기능 (v5.0) ───────────────────────────────────────── */

/* 워크 리스트 */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

/* 미분류 안내 */
.empty-state-inline {
    padding: 12px 0 20px;
}

/* 워크 상세 헤더 */
.work-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 4px;
}
.work-detail-header .work-icon { font-size: 28px; }
.work-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

/* 팝업 공통 */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.popup-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 20px 20px;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.popup-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}
.popup-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Work 팝업 전용 */
.work-popup-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}
.work-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s;
}
.work-popup-item:hover { background: var(--gray-100); }
.work-popup-item.selected { background: var(--blue-light); }
.work-popup-item input[type="radio"] { accent-color: var(--blue); }
.work-popup-item-title { flex: 1; font-size: 14px; font-weight: 500; }
.work-popup-item-count { font-size: 12px; color: var(--gray-500); }
.work-popup-divider {
    height: 1px;
    background: var(--gray-300);
    margin: 0 -4px;
}
.work-popup-new-row { display: flex; flex-direction: column; gap: 8px; }
.work-new-input { margin-top: 4px; }

/* ── 채팅 UI (view_skill.php) ──────────────────────────────── */
.chat-history {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;   /* 사용자 1건 + AI 1건 기준 높이 */
    overflow-y: auto;
    padding-right: 4px;  /* 스크롤바 여백 */
    scroll-behavior: smooth;
}
.chat-history-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.55;
    word-break: break-word;
}
.chat-bubble-user {
    align-self: flex-end;
    background: var(--blue);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble-ai {
    align-self: flex-start;
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-900);
    border-bottom-left-radius: 4px;
}
.chat-bubble-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 4px;
}
.chat-bubble-time {
    font-size: 10px;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
    text-align: right;
}
.chat-bubble-ai .chat-bubble-time {
    color: var(--gray-500);
}
.chat-empty-hint {
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
    padding: 16px 0 8px;
    width: 100%;
}

/* ── AI 채팅 입력 패널 (PC/모바일 공통 하단 고정) ──────────── */
.ai-chat-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1.5px solid var(--gray-200);
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-chat-panel > * {
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
}
.ai-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.ai-chat-input {
    flex: 1;
    height: 36px;
    padding: 0 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: 20px;
    font-size: 15px;
    color: var(--gray-900);
    background: var(--gray-100);
    outline: none;
    transition: border-color .2s, background .2s;
}
.ai-chat-input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: none;
}
.btn-ai-send {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
    padding: 0;
}
.btn-ai-send:active {
    transform: scale(0.92);
    background: #006ae0;
}
.btn-ai-send:disabled {
    background: var(--gray-300);
    cursor: default;
    transform: none;
}
.ai-chat-complete-row {
    padding-top: 4px;
}
.btn-complete {
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.btn-complete:active {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* ── Work 이름 편집 행 ──────────────────────────────────────── */
.work-rename-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.work-rename-input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 700;
}


/* ── 채팅 패널 spacer (PC/모바일 공통) ────────────────────── */
.chat-bottom-spacer { display: block; }

/* 전송 버튼: 로딩 상태 (스피너) */
.btn-ai-send .send-icon    { display: block; }
.btn-ai-send .send-spinner { display: none; }
.btn-ai-send.loading .send-icon    { display: none; }
.btn-ai-send.loading .send-spinner {
    display: block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin .6s linear infinite;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    /* 모바일: 둥근 상단 + 강한 그림자 */
    .ai-chat-panel {
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,.10);
    }

    /* iOS Safari 자동 확대 방지: font-size 16px 미만 input은 zoom 유발 */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select,
    .form-input,
    .form-select,
    .form-textarea,
    .ai-chat-input,
    .work-rename-input {
        font-size: 16px !important;
    }

    /* 채팅 히스토리 max-height 축소 (Skill 영역 가독성 확보) */
    .chat-history { max-height: 160px; }
}

/* ── CodeMirror 6 Tool ──────────────────────────────────────── */
.cm6-wrapper {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 4px 0;
}
.cm6-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: #21252b;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.cm6-lang-select {
    background: rgba(255,255,255,.08);
    color: #abb2bf;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}
.cm6-lang-select:focus {
    border-color: rgba(255,255,255,.35);
}
.cm6-lang-badge {
    font-size: 12px;
    color: #abb2bf;
    font-family: "JetBrains Mono","Fira Code","Menlo","Consolas",monospace;
}
.cm6-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cm6-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: #abb2bf;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    margin-left: auto;
}
.cm6-copy-btn:hover {
    background: rgba(255,255,255,.15);
    color: #e5e5e5;
}
.cm6-copy-btn.copied {
    color: #34c759;
}
.cm6-host > .cm-editor {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════
   v6.0 마이크로인터랙션 & UI 폴리시
   ═══════════════════════════════════════════════════════════ */

/* ── 페이지 진입 페이드인 ──────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.container, .container-wide {
    animation: fadeInUp 0.35s ease-out;
}

/* ── 버튼 Active(눌림) 피드백 ──────────────────────────────── */
.btn:active:not(:disabled) {
    transform: scale(0.96);
    transition-duration: 0.1s;
}
.btn-primary:active:not(:disabled) { background: #004db3; }
.btn-green:active:not(:disabled)   { background: #1a7a30; }
.btn-danger:active:not(:disabled)  { background: #a01010; }
.btn-ghost:active:not(:disabled)   { background: var(--gray-300); }
.google-login-btn:active { transform: scale(0.97); box-shadow: none; }

/* ── Skill 카드 순차 등장 ──────────────────────────────────── */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* ── 채팅 버블 슬라이드인 ──────────────────────────────────── */
@keyframes bubbleSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-bubble {
    animation: bubbleSlideIn 0.25s ease-out;
}

/* ── 팝업 배경 페이드 + 박스 스케일인 ──────────────────────── */
@keyframes backdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes popupScaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.popup-overlay {
    animation: backdropFadeIn 0.2s ease-out;
}
.popup-box {
    animation: popupScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 드래그 앤 드롭 시각 피드백 ─────────────────────────────── */
.drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
    transform: scale(0.85) rotate(-2deg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    transition: none;
    max-width: 160px;
}
.drag-mode-hint {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 9998;
    white-space: nowrap;
    animation: fadeInUp 0.25s ease-out;
    pointer-events: none;
}
/* 미분류 드롭존 (Stack 해제용) */
.unassign-dropzone {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-500);
    font-size: 14px;
    transition: all .2s ease-out;
}
.unassign-dropzone.visible {
    display: flex;
    animation: fadeInUp 0.2s ease-out;
}
.unassign-dropzone.drag-hover {
    border-color: var(--blue);
    background: rgba(0, 122, 255, 0.06);
    color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    transform: scale(1.02);
}
.unassign-dropzone-icon {
    font-size: 20px;
}

/* ── 빈 상태 아이콘 숨쉬기 ──────────────────────────────────── */
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%      { transform: scale(1.08); opacity: 1; }
}
.empty-state .empty-icon {
    animation: breathe 3s ease-in-out infinite;
}

/* ── 로딩 오버레이 블러 + 페이드인 ─────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.loading-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

/* ── 섹션 헤더 하단 구분선 ─────────────────────────────────── */
.section-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

/* ── 토글 스위치 스프링 이징 ───────────────────────────────── */
.toggle-slider::before {
    transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.edit-toggle-slider::after {
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ── AI 채팅 입력 포커스 ──────────────────────────────────── */
.ai-chat-input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: none;
}

/* ── Toast 알림 시스템 ─────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 32px);
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2.7s forwards;
    box-shadow: var(--shadow-md);
}
.toast-success { background: #065f46; color: #fff; }
.toast-error   { background: #991b1b; color: #fff; }
.toast-info    { background: var(--gray-900); color: #fff; }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* ── FAB (Floating Action Button) ─────────────────────────── */
.fab {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 0 20px 0 14px;
    border-radius: 26px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    box-shadow:
        0 4px 16px rgba(0, 122, 255, .35),
        0 2px 6px rgba(0, 0, 0, .10);
    z-index: 900;
    transition: transform .2s cubic-bezier(.4,0,.2,1),
                box-shadow .2s cubic-bezier(.4,0,.2,1);
    -webkit-tap-highlight-color: transparent;
}
.fab:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 122, 255, .40),
        0 2px 8px rgba(0, 0, 0, .12);
}
.fab:active {
    transform: scale(0.95);
    box-shadow:
        0 2px 8px rgba(0, 122, 255, .30),
        0 1px 3px rgba(0, 0, 0, .08);
}
.fab-icon {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}
.fab-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ── iOS 버튼 패턴 ─────────────────────────────────────────── */
/* 텍스트 액션 (블루) */
.btn-text-action {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 15px;
    font-weight: 400;
    font-family: inherit;
    padding: 4px 2px;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .15s;
}
.btn-text-action:active { opacity: 0.4; }

/* 테두리 pill 버튼 */
.btn-pill-outline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: 16px;
    background: var(--white);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s, background .15s;
}
.btn-pill-outline:active {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

/* 아이콘 버튼 */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s;
}
.btn-icon:active {
    background: var(--gray-200);
}

/* ── iOS 패턴: 하단 삭제 버튼 ─────────────────────────────── */
.bottom-danger-zone {
    margin-top: 48px;
    padding: 16px 0 24px;
    border-top: 1px solid var(--gray-300);
    text-align: center;
}
.btn-destructive {
    display: inline-block;
    background: none;
    border: none;
    color: var(--red);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-destructive:hover {
    background: rgba(255, 59, 48, 0.06);
}
.btn-destructive:active {
    background: rgba(255, 59, 48, 0.12);
}

/* ── 더 보기 버튼 (⋯) ────────────────────────────────────── */
.btn-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--gray-700);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.btn-more:hover { background: var(--gray-200); }
.btn-more:active { background: var(--gray-300); }

/* ── iOS 액션 시트 ────────────────────────────────────────── */
.action-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background .25s;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.action-sheet-overlay.open {
    background: rgba(0, 0, 0, 0.35);
}
.action-sheet {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.32, .72, 0, 1);
}
.action-sheet-overlay.open .action-sheet {
    transform: translateY(0);
}
.action-sheet-item {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--white);
    font-family: inherit;
    font-size: 17px;
    font-weight: 400;
    color: var(--blue);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.action-sheet-item:active {
    background: var(--gray-200);
}
.action-sheet-destructive {
    color: var(--red);
    font-weight: 600;
}
.action-sheet-cancel {
    font-weight: 700;
    margin-top: 0;
}

/* ============================================================
   v6.0 미니 그리드 카드 레이아웃 (Stack + Skill 통합)
   ============================================================ */

/* ── 미니 그리드 컨테이너 ─────────────────────────────── */
.mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

/* ── 미니 카드 (Stack + Skill 공통) ───────────────────── */
.mini-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px 10px;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-900);
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s, transform .12s;
    animation: cardFadeIn 0.35s ease-out both;
}
.mini-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    border-color: var(--blue);
    transform: translateY(-2px);
}
.mini-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* 순차 등장 딜레이 */
.mini-card:nth-child(1)  { animation-delay: 0s; }
.mini-card:nth-child(2)  { animation-delay: 0.03s; }
.mini-card:nth-child(3)  { animation-delay: 0.06s; }
.mini-card:nth-child(4)  { animation-delay: 0.09s; }
.mini-card:nth-child(5)  { animation-delay: 0.12s; }
.mini-card:nth-child(6)  { animation-delay: 0.15s; }
.mini-card:nth-child(7)  { animation-delay: 0.18s; }
.mini-card:nth-child(8)  { animation-delay: 0.21s; }
.mini-card:nth-child(9)  { animation-delay: 0.24s; }
.mini-card:nth-child(10) { animation-delay: 0.27s; }
.mini-card:nth-child(11) { animation-delay: 0.30s; }
.mini-card:nth-child(12) { animation-delay: 0.33s; }

/* 즐겨찾기 버튼 */
.pin-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s, transform .1s;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}
.mini-card:hover .pin-btn,
.mini-card.pinned .pin-btn {
    opacity: 1;
}
.pin-btn:active {
    transform: scale(1.3);
}
/* 모바일: 항상 표시 (호버 없음) */
@media (hover: none) {
    .pin-btn { opacity: 0.6; }
    .mini-card.pinned .pin-btn { opacity: 1; }
}
/* 핀된 카드 강조 */
.mini-card.pinned {
    border-color: #ffd43b;
    background: #fffef5;
}

/* ── 이모지 컨테이너 ──────────────────────────────────── */
.mini-card-emoji {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(145deg, #eaf1ff, #dce6fa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}
/* Stack 카드: 따뜻한 톤 */
.mini-card[data-stack-id] .mini-card-emoji {
    background: linear-gradient(145deg, #fff4e6, #ffe8cc);
}

/* ── 카드 제목 ────────────────────────────────────────── */
.mini-card-title {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    width: 100%;
    padding: 0 2px;
}

/* ── 카드 메타 정보 ───────────────────────────────────── */
.mini-card-meta {
    font-size: 10px;
    color: var(--gray-500);
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
/* 상태 도트 */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-draft { background: #f59f00; }
.status-done  { background: var(--green); }

/* ── 섹션 카운트 ──────────────────────────────────────── */
.section-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-500);
}

/* ── 숨김 카드 + 더 보기 토글 ─────────────────────────── */
.mini-card.hidden-card {
    display: none;
}
.mini-grid.expanded .mini-card.hidden-card {
    display: flex;
}

.btn-section-toggle {
    display: block;
    width: 100%;
    padding: 8px;
    background: none;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    margin-top: 4px;
    margin-bottom: 16px;
    transition: var(--transition);
}
.btn-section-toggle:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ── 미니 카드 드래그 앤 드롭 ─────────────────────────── */
.mini-card.dragging {
    opacity: 0.4;
    transform: scale(0.92);
    transition: opacity .15s, transform .15s;
}
.mini-card[draggable="true"] {
    cursor: grab;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.mini-card[draggable="true"]:active:not(.dragging) {
    cursor: grabbing;
}
.mini-card[data-stack-id].drag-over {
    border-color: var(--blue) !important;
    background: rgba(0, 122, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    transform: scale(1.05);
    transition: all .15s ease-out;
}
.mini-card.drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
    transform: scale(0.9) rotate(-2deg);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    max-width: 120px;
    transition: none;
}

/* ── 휴지통 드롭존 (드래그 삭제) ─────────────────────── */
.trash-dropzone {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 20px;
    background: var(--gray-800);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 9990;
    transition: bottom .3s cubic-bezier(.4,0,.2,1), background .2s, transform .2s;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    pointer-events: auto;
    white-space: nowrap;
}
.trash-dropzone.visible {
    bottom: 32px;
}
.trash-dropzone.drag-hover {
    background: var(--red);
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 6px 28px rgba(255,59,48,.35);
}
.trash-dropzone-icon {
    font-size: 20px;
}

/* ── 일괄삭제 모드 ───────────────────────────────────── */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    animation: fadeInUp 0.2s ease-out;
}
.batch-bar .batch-count {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}
.batch-bar .batch-count strong {
    color: var(--red);
}
.mini-card.batch-mode {
    position: relative;
    cursor: pointer;
}
.mini-card.batch-mode .batch-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all .15s;
    z-index: 2;
}
.mini-card.batch-mode.batch-selected {
    border-color: var(--red) !important;
    background: rgba(255, 59, 48, 0.04);
}
.mini-card.batch-mode.batch-selected .batch-check {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}
.mini-card.batch-mode .pin-btn {
    display: none;
}

/* ── 미니 그리드 반응형 ───────────────────────────────── */
@media (max-width: 480px) {
    .mini-grid { gap: 8px; }
    .mini-card { padding: 12px 4px 8px; }
    .mini-card-emoji { width: 38px; height: 38px; font-size: 20px; border-radius: 10px; }
    .mini-card-title { font-size: 11px; }
}

/* ── 자동 분류 팝업 ───────────────────────────────────── */
.classify-popup {
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.classify-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    -webkit-overflow-scrolling: touch;
}
.classify-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.classify-emoji {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.classify-skill {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.classify-arrow {
    color: var(--gray-400);
    flex-shrink: 0;
    font-size: 12px;
}
.classify-stack {
    font-size: 12px;
    color: var(--gray-700);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 로딩 dots 애니메이션 */
.loading-dots::after {
    content: '';
    animation: loadDots 1.2s steps(4, end) infinite;
}
@keyframes loadDots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* ── Skill 추천 팝업 ─────────────────────────────────── */
.suggest-popup {
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.suggest-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    -webkit-overflow-scrolling: touch;
}
.suggest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    text-align: left;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--gray-900);
}
.suggest-row:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}
.suggest-row:active {
    transform: scale(0.98);
}
.suggest-row.creating {
    opacity: 0.6;
    pointer-events: none;
}
.suggest-row.created {
    opacity: 0.5;
    pointer-events: none;
    background: #f0faf0;
    border-color: var(--green);
}
.suggest-row-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.suggest-row-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggest-row-subtitle {
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggest-row-arrow {
    flex-shrink: 0;
    font-size: 16px;
    color: var(--blue);
    font-weight: 700;
    min-width: 44px;
    text-align: center;
}

/* 팝업 닫기 애니메이션 */
.popup-overlay.closing {
    animation: backdropFadeIn 0.2s ease-out reverse forwards;
}
.popup-overlay.closing .popup-box {
    animation: popupScaleIn 0.2s ease-in reverse forwards;
}

/* ── 도움말 페이지 ───────────────────────────────────── */
.help-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.help-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    overflow: hidden;
    animation: cardFadeIn 0.35s ease-out both;
}
.help-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
}
.help-card-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}
.help-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}
.help-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.help-item h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gray-900);
}
.help-item p {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0;
}
.help-item ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.7;
}
.help-item ul li {
    margin-bottom: 2px;
}
.help-item + .help-item {
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
}

/* 흐름 스텝 */
.help-flow {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.help-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.help-flow-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.help-flow-step strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}
.help-flow-step p {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    margin: 0;
}

/* ── Push/Pull 공유 ─────────────────────────────────── */

/* 헤더 Push 아이콘 뱃지 */
.btn-icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--gray-900);
}
.btn-icon-badge:hover {
    background: var(--gray-200);
}
.badge-count {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* 탭 바 */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-300);
    margin-bottom: 16px;
}
.tab-btn {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Push 목록 */
.push-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.push-loading,
.push-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--gray-500);
    font-size: 14px;
}

/* Push 아이템 카드 */
.push-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}
.push-item-pending {
    border-left: 3px solid var(--blue);
}
.push-item-pulled,
.push-item-rejected {
    opacity: 0.55;
}
.push-item-deleted {
    opacity: 0.45;
}

.push-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.push-item-body {
    flex: 1;
    min-width: 0;
}
.push-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.push-item-title {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.push-title-deleted {
    text-decoration: line-through;
    color: var(--gray-500);
}
.push-item-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 3px;
    line-height: 1.4;
}
.push-item-msg {
    font-size: 13px;
    color: var(--gray-700);
    margin-top: 6px;
    padding: 6px 10px;
    background: var(--gray-100);
    border-radius: 6px;
    line-height: 1.4;
}
.push-type-label {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--gray-200);
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
}

/* 상태 뱃지 */
.push-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}
.push-badge-pulled {
    background: #e8f5e9;
    color: #2e7d32;
}
.push-badge-rejected {
    background: #fce4ec;
    color: #c62828;
}
.push-badge-deleted {
    background: var(--gray-200);
    color: var(--gray-500);
}

/* 액션 버튼 */
.push-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

/* Push 팝업 */
.push-popup-field {
    margin-bottom: 12px;
}
.push-popup-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.push-popup-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.push-popup-field input:focus {
    border-color: var(--blue);
}
.push-popup-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}
.push-popup-info {
    font-size: 13px;
    color: var(--gray-700);
    padding: 8px 12px;
    background: var(--blue-light);
    border-radius: 6px;
    margin-bottom: 12px;
}

/* ============================================================
   LANDING PAGE — 공개 포트폴리오
   ============================================================ */

.landing-page {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    min-height: 100vh;
}

/* Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 12, 41, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.landing-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}
.landing-header .landing-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.landing-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}
.landing-admin-link {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    transition: all .2s;
}
.landing-admin-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
}

/* Hero */
.landing-main {
    padding-top: 120px;
    padding-bottom: 80px;
}
.landing-hero {
    text-align: center;
    margin-bottom: 64px;
    animation: fadeInUp .8s ease-out;
}
.landing-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}
.landing-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.05);
}
.landing-profile-text {
    text-align: left;
}
.landing-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.landing-hero-sub {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .landing-profile {
        flex-direction: column;
        gap: 20px;
    }
    .landing-profile-text {
        text-align: center;
    }
    .landing-avatar {
        width: 110px;
        height: 110px;
    }
}

/* Section */
.landing-section {
    margin-bottom: 64px;
    animation: fadeInUp .8s ease-out .15s both;
}
.landing-section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
}

/* Cards Grid */
.landing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.landing-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px 24px;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}
.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.6), transparent);
    opacity: 0;
    transition: opacity .3s;
}
.landing-card-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    cursor: pointer;
}
.landing-card-link:hover::before {
    opacity: 1;
}
.landing-card-soon {
    opacity: 0.5;
    border-style: dashed;
}
.landing-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.landing-card-icon {
    font-size: 2rem;
}
.landing-card-badge {
    font-size: 11px;
    font-weight: 600;
    color: #34d399;
    background: rgba(52,211,153,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.badge-wip {
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
}
.landing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.landing-card p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 16px;
}
.landing-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.landing-card-tags span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.07);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Section Desc */
.landing-section-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    margin-top: -12px;
    margin-bottom: 24px;
}

/* AI Tech Map */
.ai-map {
    display: grid;
    gap: 20px;
}
.ai-map-group {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
}
.ai-map-group-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.ai-map-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    transition: all .2s;
}
.ai-chip small {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.65;
}
.ai-chip.ai-done {
    color: #34d399;
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.2);
}
.ai-chip.ai-wip {
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.ai-map-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}
.ai-legend {
    font-size: 12px;
    cursor: default;
}

/* AI World Diagram */
.ai-world {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 24px 32px;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ai-world::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(129,140,248,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.ai-world-core {
    margin-bottom: 24px;
}
.ai-world-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(129,140,248,0.4);
    background: rgba(129,140,248,0.08);
    position: relative;
}
.ai-world-label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.ai-world-label small {
    font-size: 10px;
    font-weight: 400;
    color: rgba(165,180,252,0.6);
}
.ai-world-mid, .ai-world-outer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ai-world-node {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    text-align: center;
    line-height: 1.4;
}
.ai-world-node small {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.35);
}
.node-comm { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.06); }
.node-know { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }
.node-act { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); }
.node-tool { border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.06); }
.node-out { border-color: rgba(192,132,252,0.3); background: rgba(192,132,252,0.06); }
.ai-world-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
}

/* AI Human Mapping */
.ai-world-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}
.ai-human-map {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto 24px;
    text-align: left;
}
.ai-human-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    transition: all .25s;
}
.ai-human-row:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    transform: translateX(4px);
}
.ai-human-part {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    flex-shrink: 0;
}
.ai-human-emoji {
    font-size: 1.5rem;
    line-height: 1;
}
.ai-human-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    line-height: 1.3;
}
.ai-human-label small {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.3);
}
.ai-human-arrow {
    font-size: 14px;
    font-weight: 700;
    color: rgba(129,140,248,0.5);
    flex-shrink: 0;
}
.ai-human-ai {
    flex: 1;
    min-width: 0;
}
.ai-human-ai strong {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    display: block;
    margin-bottom: 2px;
}
.ai-human-ai p {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    margin: 0;
}
@media (max-width: 640px) {
    .ai-human-part { min-width: 90px; }
    .ai-human-label { font-size: 11px; }
    .ai-human-ai strong { font-size: 12px; }
    .ai-human-ai p { font-size: 10px; }
}

/* AI Tool Logos */
.ai-tool-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 8px;
}
.ai-logo-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: all .2s;
    text-decoration: none;
    cursor: pointer;
}
a.ai-logo-item:hover {
    background: rgba(129,140,248,0.15);
    border-color: rgba(129,140,248,0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.ai-logo-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.7;
}
.ai-logo-item span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
}
.ai-logo-text {
    width: 16px;
    height: 16px;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* AI Concept Blocks */
.ai-concept {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-concept-block {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .3s;
}
.ai-concept-block:hover {
    border-color: rgba(255,255,255,0.18);
}
.ai-concept-header {
    display: flex;
    gap: 16px;
    padding: 24px 24px 16px;
    align-items: flex-start;
}
.ai-concept-num {
    font-size: 13px;
    font-weight: 800;
    color: rgba(129,140,248,0.5);
    background: rgba(129,140,248,0.08);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.ai-concept-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.ai-concept-en {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(165,180,252,0.6);
    margin-left: 6px;
}
.ai-concept-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
}
.ai-concept-body {
    padding: 0 24px 24px;
}
.ai-concept-sub {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
}
.ai-concept-sub:last-child { margin-bottom: 0; }
.ai-concept-sub h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}
.ai-concept-sub p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
    margin-bottom: 10px;
}
.ai-concept-items {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    line-height: 1.8;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.ai-concept-terms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-term {
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.ai-term strong {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-bottom: 5px;
}
.ai-term strong .ai-concept-en {
    font-weight: 400;
}
.ai-term p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
    margin: 0 0 6px;
}
.ai-term .ai-concept-items {
    border-top: none;
    padding-top: 0;
    font-size: 0.75rem;
}

/* Tech Stack */
.landing-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    animation: fadeInUp .8s ease-out .3s both;
}
.landing-stack-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
}
.landing-stack-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.landing-stack-value {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
}

/* Footer */
.landing-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

/* ── AI Speed Counter ──────────────────────────────── */
.ai-speed {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 36px 24px 28px;
    margin-bottom: 32px;
}
.ai-speed-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}
.ai-speed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.ai-speed-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 20px 18px;
    position: relative;
    transition: border-color .3s;
}
.ai-speed-card:hover {
    border-color: rgba(255,255,255,0.18);
}
.ai-speed-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.ai-speed-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.ai-speed-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-speed-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-speed-tag {
    font-size: 10px;
    font-weight: 700;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.ai-tag-before { color: rgba(255,255,255,0.35); }
.ai-tag-after { color: #34d399; }
.ai-speed-bar-bg {
    flex: 1;
    height: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    overflow: hidden;
}
.ai-speed-bar {
    height: 100%;
    width: 0;
    border-radius: 6px;
    transition: width 1.4s cubic-bezier(.22,1,.36,1);
}
.ai-bar-before {
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.15));
}
.ai-bar-after {
    background: linear-gradient(90deg, #34d399, #6ee7b7);
    box-shadow: 0 0 12px rgba(52,211,153,0.3);
}
.ai-speed-val {
    font-size: 13px;
    font-weight: 700;
    width: 52px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.ai-val-before { color: rgba(255,255,255,0.4); }
.ai-val-after { color: #34d399; }
.ai-speed-save {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #a5b4fc;
    background: rgba(129,140,248,0.1);
    padding: 5px 12px;
    border-radius: 6px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity .4s, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.ai-speed-save.visible {
    opacity: 1;
    transform: scale(1);
}
@media (max-width: 900px) {
    .ai-speed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 560px) {
    .ai-speed-grid {
        grid-template-columns: 1fr;
    }
    .ai-speed { padding: 24px 16px 20px; }
}

/* ── Prompt Before/After Compare ───────────────────── */
.ai-prompt-compare {
    margin-top: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px 24px;
}
.ai-prompt-compare-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.ai-prompt-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.ai-prompt-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all .2s;
}
.ai-prompt-tab:hover {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.2);
}
.ai-prompt-tab.active {
    color: #a5b4fc;
    background: rgba(129,140,248,0.12);
    border-color: rgba(129,140,248,0.3);
}
.ai-prompt-panel {
    display: none;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}
.ai-prompt-panel.active {
    display: grid;
    animation: fadeInUp .4s ease-out;
}
.ai-prompt-side {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-prompt-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}
.ai-label-bad {
    color: #f87171;
    background: rgba(248,113,113,0.12);
}
.ai-label-good {
    color: #34d399;
    background: rgba(52,211,153,0.12);
}
.ai-prompt-input {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-style: italic;
}
.ai-prompt-bad .ai-prompt-input {
    border-color: rgba(248,113,113,0.15);
}
.ai-prompt-good .ai-prompt-input {
    border-color: rgba(52,211,153,0.15);
}
.ai-prompt-result {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ai-prompt-result-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.ai-prompt-result pre {
    flex: 1;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 14px;
    margin: 0;
    overflow-x: auto;
}
.ai-prompt-result code {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255,255,255,0.55);
    white-space: pre;
}
.ai-prompt-bad .ai-prompt-result code {
    color: rgba(255,255,255,0.35);
}
.ai-prompt-good .ai-prompt-result code {
    color: #a5b4fc;
}
.ai-prompt-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: rgba(255,255,255,0.2);
    width: 40px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .ai-prompt-panel.active {
        grid-template-columns: 1fr;
    }
    .ai-prompt-vs {
        width: auto;
        height: 24px;
    }
    .ai-prompt-result code {
        font-size: 11px;
    }
}

/* STEP Number */
.ai-step-num {
    font-size: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(129,140,248,0.2), rgba(129,140,248,0.08));
    border: 2px solid rgba(129,140,248,0.35);
    color: #a5b4fc;
}

/* Step Tools Box */
.ai-step-tools {
    background: rgba(129,140,248,0.05);
    border: 1px solid rgba(129,140,248,0.12);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.ai-step-tools-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #a5b4fc;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}
.ai-step-tools .ai-tool-logos {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* "언제 쓰나?" Badge */
.ai-when-use {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(129,140,248,0.08);
    border: 1px solid rgba(129,140,248,0.18);
    border-radius: 8px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}
.ai-when-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(129,140,248,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    letter-spacing: 0.02em;
}

/* Example Box */
.ai-example-box {
    margin-top: 16px;
    padding: 16px;
    background: rgba(52,211,153,0.04);
    border: 1px solid rgba(52,211,153,0.12);
    border-radius: 10px;
}
.ai-example-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(52,211,153,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.ai-example-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-example-box li {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}
.ai-example-box li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: rgba(52,211,153,0.5);
    font-size: 0.75rem;
}
.ai-example-box li strong {
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}

/* Scenario Section */
.ai-scenario-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.ai-scenario {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px 24px;
    transition: border-color .3s;
}
.ai-scenario:hover {
    border-color: rgba(255,255,255,0.18);
}
.ai-scenario-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.ai-scenario-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}
.ai-scenario-flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 4px;
}
.ai-flow-step {
    flex: 1;
    min-width: 180px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-flow-num {
    width: 24px;
    height: 24px;
    background: rgba(129,140,248,0.15);
    color: #a5b4fc;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-flow-content strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    display: block;
    margin-bottom: 4px;
}
.ai-flow-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #a5b4fc;
    background: rgba(129,140,248,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}
.ai-flow-content p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    margin: 0;
}
.ai-flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    position: relative;
}
.ai-flow-arrow::after {
    content: '→';
    color: rgba(129,140,248,0.4);
    font-size: 18px;
    font-weight: 300;
}
@media (max-width: 768px) {
    .ai-scenario-flow {
        flex-direction: column;
        gap: 0;
    }
    .ai-flow-step {
        min-width: unset;
    }
    .ai-flow-arrow {
        width: auto;
        height: 24px;
    }
    .ai-flow-arrow::after {
        content: '↓';
    }
}

/* Developer Shift Section */
.ai-shift-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-shift-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    transition: all .3s;
    align-items: flex-start;
}
.ai-shift-item:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
}
.ai-shift-icon {
    font-size: 14px;
    font-weight: 800;
    color: rgba(129,140,248,0.6);
    background: rgba(129,140,248,0.1);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-shift-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.ai-shift-body p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    margin: 0;
}
.ai-shift-body strong {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}
@media (max-width: 640px) {
    .ai-shift-item {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   LOGIN PAGE — 다크 테마 로그인
   ============================================================ */

.login-page-dark {
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-dark-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 40px 24px;
    animation: fadeInUp .6s ease-out;
}
.login-back-link {
    align-self: flex-start;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    margin-bottom: 40px;
    transition: color .2s;
}
.login-back-link:hover {
    color: rgba(255,255,255,0.8);
}
.login-dark-card {
    width: 100%;
    text-align: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px 32px 36px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.login-dark-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12);
    margin-bottom: 20px;
    background: rgba(255,255,255,0.04);
}
.login-dark-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 8px;
}
.login-dark-sub {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    margin-bottom: 28px;
}
.login-dark-error {
    font-size: 13px;
    color: #f87171;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
}
.login-dark-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    background: #fff;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.login-dark-google-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.login-dark-footer {
    margin-top: 32px;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
}


/* ============================================================
   ADMIN PAGE — 관리자 대시보드
   ============================================================ */

/* ── Admin 따뜻한 베이지 테마 ────────────────────────── */
.admin-page {
    --warm-bg:      #faf7f2;
    --warm-card:    #fffcf7;
    --warm-border:  #ebe4d8;
    --warm-border-light: #f0ebe3;
    --warm-accent:  #b8860b;
    --warm-accent-light: #f5eacc;
    --warm-text:    #5c4a32;
    --warm-text-light: #8c7b65;
    --warm-header:  #fefcf8;
    background: var(--warm-bg);
    min-height: 100vh;
}

/* Admin Header */
.admin-header {
    background: var(--warm-header);
    border-bottom: 1px solid var(--warm-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    transition: max-width .25s ease;
}
.admin-header .admin-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.admin-nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
    margin-right: 16px;
}
.admin-nav-links a {
    font-size: 12px;
    color: var(--warm-text-light);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.admin-nav-links a:hover {
    background: var(--warm-accent-light);
    color: var(--warm-text);
}
.admin-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.admin-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--warm-accent);
    background: var(--warm-accent-light);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-user-name {
    font-size: 13px;
    color: var(--gray-600);
}

/* Admin Main */
.admin-main {
    padding: 40px 0 80px;
}
.admin-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.admin-subtitle {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 36px;
}

/* Admin Card Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.admin-card {
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all .2s;
}
.admin-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
}
.admin-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-card-icon {
    font-size: 1.5rem;
}
.admin-card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
}
.admin-card p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 12px;
}
.admin-card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.admin-card-list li {
    font-size: 0.82rem;
    color: var(--gray-500);
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
}
.admin-card-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--blue);
}
.admin-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}
.admin-card-stat {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
}

/* Admin Tools Section */
.admin-tools {
    margin-top: 8px;
}
.admin-tools h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}
.admin-tools-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-tool-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: all .2s;
}
.admin-tool-link:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-tint);
}

/* Admin Nav Tabs */
.admin-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    background: var(--warm-card);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid var(--warm-border-light);
    overflow-x: auto;
}
.admin-nav-btn {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--warm-text-light);
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.admin-nav-btn:hover { color: var(--warm-text); background: rgba(184,134,11,0.06); }
.admin-nav-btn.active {
    color: var(--warm-text);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Admin Tabs */
.admin-tab { display: none; }
.admin-tab.active { display: block; }

/* Admin Stat Row */
.admin-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.admin-stat-card {
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}
.admin-stat-card.stat-done { border-left: 3px solid #16a34a; }
.admin-stat-card.stat-wip { border-left: 3px solid #f59e0b; }
.admin-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
}
.admin-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Admin Section Block */
.admin-section-block {
    margin-bottom: 28px;
}
.admin-section-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Admin Table */
.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    background: #fff;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    background: var(--gray-100);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-300);
    white-space: nowrap;
}
.admin-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }
.st-done {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    background: rgba(22,163,74,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}
.st-wip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245,158,11,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}
.st-hold {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    background: rgba(156,163,175,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}
.st-manual {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: rgba(107,114,128,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

/* SI Knowledge Sub-category */
.si-sub-category {
    margin-bottom: 8px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}
.si-sub-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
    cursor: pointer;
    transition: background 0.15s;
}
.si-sub-title:hover { background: var(--gray-100); }
.si-toggle-icon {
    font-size: 16px;
    color: var(--gray-400);
    transition: transform 0.2s;
}
.si-sub-title.open .si-toggle-icon { transform: rotate(45deg); }
.si-sub-content {
    padding: 0 20px 20px;
}

/* Admin Detail Card */
.admin-detail-card {
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.admin-detail-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
}
.admin-detail-card p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
    line-height: 1.6;
}
.admin-detail-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.admin-detail-card li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 3px 0 3px 16px;
    position: relative;
    line-height: 1.5;
}
.admin-detail-card li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--blue);
}
.admin-detail-card li + h4 { margin-top: 16px; }
.admin-meta {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-400);
    margin-left: 6px;
}
.admin-pre {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--gray-700);
    background: var(--gray-100);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    line-height: 1.6;
    white-space: pre;
    margin: 0;
}

/* Deliverable Accordion Items */
.admin-filter-info {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 24px;
}
.dlv-item {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    background: #fff;
    overflow: hidden;
}
.dlv-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
    font-size: 14px;
}
.dlv-header:hover { background: var(--gray-50); }
.dlv-header strong {
    flex: 1;
    font-weight: 600;
    color: var(--gray-800);
}
.dlv-script {
    font-size: 11px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--gray-400);
    white-space: nowrap;
}
.dlv-toggle {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-400);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.dlv-detail {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--gray-200);
}
.dlv-item.open .dlv-detail { display: block; }
.dlv-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.7;
    padding: 14px 0;
}
.dlv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.dlv-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 14px;
}
.dlv-box h5 {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.dlv-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dlv-box li {
    font-size: 12px;
    color: var(--gray-600);
    padding: 2px 0 2px 12px;
    position: relative;
    line-height: 1.5;
}
.dlv-box li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--blue);
}
.dlv-box pre {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 11px;
    color: var(--gray-700);
    background: var(--gray-100);
    border-radius: 4px;
    padding: 8px 10px;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
    line-height: 1.6;
}
.st-manual {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Placeholder Section */
.admin-placeholder {
    text-align: center;
    padding: 60px 24px;
}
.admin-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.admin-placeholder h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}
.admin-placeholder > p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 32px;
}
.admin-placeholder-plan {
    text-align: left;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 24px;
}
.admin-placeholder-plan h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
}
.admin-placeholder-plan ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.admin-placeholder-plan li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0 4px 16px;
    position: relative;
}
.admin-placeholder-plan li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--gray-400);
}

/* Resource Library */
.res-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.res-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.res-card {
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color .2s;
}
.res-card:hover { border-color: var(--blue); }
.res-card-top {
    padding: 20px 20px 12px;
}
.res-card-info {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.res-phase {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
}
.res-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.res-card-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}
.res-card-body {
    padding: 0 20px 12px;
}
.res-field {
    margin-bottom: 10px;
}
.res-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.res-field span {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
}
.res-field pre {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 11px;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
}
.res-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .res-field-row { grid-template-columns: 1fr; }
}
.res-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    gap: 12px;
    flex-wrap: wrap;
}
.res-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--gray-400);
    flex-wrap: wrap;
}
.res-contains {
    font-size: 11px;
    color: var(--gray-400);
}
.res-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.res-download-btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

/* Admin Footer */
.admin-footer {
    border-top: 1px solid var(--gray-300);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .landing-cards {
        grid-template-columns: 1fr;
    }
    .landing-info {
        gap: 24px;
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   세계관 기반 산출물 카드 수집 시스템
   ═══════════════════════════════════════════════════════════ */

/* ── 와이드 토글 (doc.jh84.me 스타일) ────────────────── */
.admin-wide-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--warm-border);
    border-radius: 8px;
    background: var(--warm-card);
    cursor: pointer;
    color: var(--warm-text-light);
    transition: all .15s;
    flex-shrink: 0;
}
.admin-wide-toggle:hover { border-color: var(--warm-accent); color: var(--warm-accent); }
.admin-wide-toggle svg { display: block; }

/* body.wide-mode 적용 */
body.wide-mode .admin-wide-toggle { border-color: var(--warm-accent); color: var(--warm-accent); background: var(--warm-accent-light); }
body.wide-mode .admin-container {
    max-width: 100% !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    transition: max-width .25s ease;
}
body.wide-mode .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
body.wide-mode .world-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* ── 세계관 완성도 바 ───────────────────────────────── */
.world-progress-bar {
    background: var(--gray-100);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.world-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.world-progress-header h2 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.world-progress-stats {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 600;
}
.world-progress-track {
    height: 8px;
    background: var(--gray-300);
    border-radius: 4px;
    overflow: hidden;
}
.world-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.world-progress-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray-600);
}
.world-progress-legend span { display: flex; align-items: center; gap: 4px; }

/* ── 세계 요소 그리드 ───────────────────────────────── */
.world-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}
.world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.world-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s;
    border: 1.5px solid var(--gray-200);
    position: relative;
}
.world-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.world-card.confirmed { border-color: var(--blue); background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%); }
.world-card.pending { border-style: dashed; border-color: var(--gray-300); }
.world-card-emoji { font-size: 28px; margin-bottom: 8px; }
.world-card-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.world-card-desc { font-size: 11px; color: var(--gray-500); line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.world-card-file { font-size: 10px; font-family: 'SF Mono', Consolas, monospace; color: var(--gray-400); }
.world-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.world-card.confirmed .world-card-badge { background: #dbeafe; color: #1d4ed8; }
.world-card.pending .world-card-badge { background: var(--gray-200); color: var(--gray-500); }
.world-card-count { font-size: 10px; color: var(--gray-400); margin-top: 4px; }

/* 세계 요소 → 카드 연결선 표시 영역 */
.world-derived-cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--gray-200);
}
.world-derived-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    white-space: nowrap;
}
.world-derived-chip.done { background: #dbeafe; color: #1d4ed8; }
.world-derived-chip.locked { background: var(--gray-100); color: var(--gray-400); }

/* ── 카드 컬렉션 ─────────────────────────────────── */
.card-collection-counter {
    background: linear-gradient(135deg, #3d2e1f 0%, #5c4033 50%, #4a3728 100%);
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 24px;
    color: #fff;
    border: 1px solid rgba(184,134,11,0.2);
}
.card-collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.card-collection-header h2 { font-size: 18px; font-weight: 700; }
.card-collection-header .cc-count { font-size: 24px; font-weight: 800; color: #f5deb3; }
.card-collection-track {
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    overflow: hidden;
}
.card-collection-fill {
    height: 100%;
    background: linear-gradient(90deg, #daa520, #f5deb3);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.card-collection-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* ── 카드팩 (파이프라인 그룹) ──────────────────── */
.card-pack {
    margin-bottom: 32px;
}
.card-pack-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
}
.card-pack-emoji { font-size: 20px; }
.card-pack-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--warm-text);
}
.card-pack-phase {
    font-size: 12px;
    color: var(--warm-text-light);
}
.card-pack-progress {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}
.card-pack-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}
.card-pack-ratio {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}

/* ── 카드 그리드 ─────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.admin-container.wide-mode .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* ── 개별 카드 ─────────────────────────────── */
.collect-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
    background: var(--warm-card);
    border: 1.5px solid var(--warm-border);
}
.collect-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 카드 — 수집완료 (done) */
.collect-card[data-status="done"] {
    border-color: #d4a853;
    background: linear-gradient(135deg, #fffcf5 0%, #fdf4e3 100%);
    box-shadow: 0 0 12px rgba(184,134,11,0.12);
}
.collect-card[data-status="done"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.15) 50%, transparent 55%);
    animation: cardShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cardShimmer {
    0%, 100% { transform: translateX(-120%); }
    50% { transform: translateX(120%); }
}

/* 카드 — 작업중 (in_progress) */
.collect-card[data-status="in_progress"] {
    border-color: #c8976a;
    background: linear-gradient(135deg, #fffcf7 0%, #fff5e8 100%);
}

/* 카드 — 잠김 (locked) */
.collect-card[data-status="locked"] {
    border-style: dashed;
    border-color: var(--warm-border);
    background: #f5f0e8;
}
.collect-card[data-status="locked"] .card-image {
    filter: grayscale(100%) brightness(0.6);
    opacity: 0.35;
}
.collect-card[data-status="locked"] .card-name { color: var(--gray-400); }
.collect-card[data-status="locked"] .card-lock-icon {
    display: flex;
}

/* 카드 내부 레이아웃 */
.card-image-wrap {
    width: 100%;
    padding: 12px 16px 0;
    text-align: center;
    position: relative;
}
.card-image {
    width: 85%;
    height: auto;
    border-radius: 8px;
    transition: filter 0.3s, opacity 0.3s;
}
.card-lock-icon {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    z-index: 2;
}
.card-info {
    padding: 8px 12px 14px;
    text-align: center;
}
.card-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--warm-text);
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-status-badge {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-block;
}
.card-status-badge.st-done { background: #f5eacc; color: #8b6914; }
.card-status-badge.st-progress { background: #fde8d0; color: #8b5e34; }
.card-status-badge.st-locked { background: #ebe4d8; color: #8c7b65; }
.card-script {
    font-size: 9px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--gray-400);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 카드 등장 애니메이션 */
.collect-card {
    opacity: 0;
    transform: translateY(20px);
}
.collect-card.card-visible {
    animation: cardFadeIn 0.4s ease forwards;
}
@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ── 트레이딩 카드 감상 모달 ───────────────────── */
.card-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(5vh, 40px);
    animation: fadeIn 0.2s;
    padding-left: 20px;
    padding-right: 20px;
    overflow-y: auto;
    backdrop-filter: blur(4px);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.card-modal-overlay::-webkit-scrollbar { display: none; }
.card-modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tc-modal {
    max-width: 420px;
    width: 100%;
    max-height: 92vh;
    overflow: visible;
    position: relative;
    animation: tcReveal 0.4s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    align-items: center;
}
@keyframes tcReveal {
    from { transform: scale(0.85) rotateY(8deg); opacity: 0; }
    to   { transform: scale(1) rotateY(0); opacity: 1; }
}

.tc-close { display: none; }

/* 트레이딩 카드 프레임 */
.tc-card-frame {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e1b4b 100%);
    border: 3px solid rgba(165,180,252,0.4);
    box-shadow: 0 0 40px rgba(99,102,241,0.2), 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    flex-shrink: 0;
    width: 100%;
}
/* 홀로그램 shimmer */
.tc-card-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.15) 42%, rgba(255,255,255,0.05) 48%, transparent 55%);
    animation: cardShimmer 4s ease-in-out infinite;
    pointer-events: none;
    border-radius: 20px;
}

/* 카드 이미지 영역 (큰 캐릭터) */
.tc-card-image {
    position: relative;
    padding: 24px 24px 0;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tc-card-image {
    cursor: pointer;
}
.tc-card-image img {
    width: 85%;
    max-width: 280px;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
    transition: transform 0.2s, opacity 0.2s;
}
.tc-card-image:hover img { transform: scale(0.97); opacity: 0.85; }
.tc-img-change {
    position: absolute;
    bottom: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.tc-img-change:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }

/* 카드 하단: 이름 + 상태 */
.tc-card-info {
    padding: 16px 24px 20px;
    text-align: center;
}
.tc-card-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.tc-card-info .card-status-badge {
    font-size: 11px;
    padding: 4px 14px;
    border-radius: 12px;
}

/* 도트 메뉴 */
.tc-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding-bottom: 2px;
}
.tc-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.tc-dot:hover { background: rgba(255,255,255,0.25); color: #fff; }
.tc-dot.active {
    background: rgba(255,255,255,0.9);
    color: #312e81;
    border-color: rgba(255,255,255,0.9);
}

/* 카드 아래 펼침 패널 */
.tc-panel {
    margin-top: 8px;
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 40vh;
    width: 100%;
    animation: panelSlide 0.25s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tc-panel::-webkit-scrollbar { display: none; }
@keyframes panelSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.tc-panel-section {
    padding: 16px 20px;
}
.tc-panel-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 10px;
}
.tc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tc-panel-header h4 { margin-bottom: 0; }

/* 세부 내용 (카드 아래 펼치기 영역) - legacy */
.tc-details {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tc-detail-group {
    background: rgba(255,255,255,0.97);
    border-radius: 14px;
    overflow: hidden;
}
.tc-detail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    transition: background 0.2s;
    user-select: none;
}
.tc-detail-toggle:hover { background: var(--gray-50); }
.tc-toggle-icon {
    font-size: 13px;
    color: var(--gray-400);
    transition: transform 0.25s;
    font-weight: 400;
    width: 20px;
    text-align: center;
}
.tc-detail-toggle.open .tc-toggle-icon { transform: rotate(45deg); }
.tc-detail-content {
    display: none;
    padding: 0 18px 16px;
}

/* 스킬 텍스트 */
.btn-sm { padding: 4px 10px; font-size: 11px; }
.modal-skill-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    white-space: pre-wrap;
    min-height: 40px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
}
.modal-skill-text:empty::after {
    content: '스킬 내용이 없습니다. 편집 버튼을 눌러 추가하세요.';
    color: var(--gray-400);
    font-style: italic;
}
.modal-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--blue);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.modal-textarea:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* 정보 그리드 */
.modal-info-grid { display: grid; gap: 10px; }
.modal-info-item label {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}
.modal-info-item span { font-size: 13px; color: var(--gray-700); }
.modal-info-item pre {
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    margin: 0;
}

/* 세계 연결 */
.card-modal-sources { display: flex; flex-direction: column; gap: 6px; }
.card-modal-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 6px 10px;
    background: var(--gray-50);
    border-radius: 8px;
}
.card-modal-source-item .src-emoji { font-size: 16px; }
.card-modal-source-item .src-status { margin-left: auto; font-size: 10px; }

/* 설정 영역 */
.modal-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.modal-edit-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    display: block;
    margin-bottom: 4px;
}
.modal-edit-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 13px;
}

/* ── 관리 버튼 ─────────────────────────────── */
.admin-action-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.btn-admin {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--warm-border);
    background: var(--warm-card);
    color: var(--warm-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-admin:hover { background: var(--warm-accent-light); }
.btn-admin-primary { background: var(--warm-accent); color: #fff; border-color: var(--warm-accent); }
.btn-admin-primary:hover { background: #9a7209; }

/* ── 보물 창고 (resources.php) ──────────────── */
.treasure-title { color: #92400e; }
.treasure-stat-card { border-left: 3px solid #f59e0b; }

.res-card.treasure-card {
    border-left: 4px solid #f59e0b;
    transition: all 0.25s;
}
.res-card.treasure-card:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}
.treasure-icon {
    font-size: 20px;
    margin-right: 8px;
}
.treasure-download-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
}
.treasure-download-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* ── 탭 스플래시 (보물 창고) ────────────────── */
.tab-splash {
    text-align: center;
    padding: 48px 20px;
}
.tab-splash-img {
    width: 220px;
    height: auto;
    border-radius: 20px;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 24px rgba(92,74,50,0.2));
}
.tab-splash-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--warm-text);
    margin-bottom: 8px;
}
.tab-splash-desc {
    font-size: 14px;
    color: var(--warm-text-light);
    margin-bottom: 24px;
}
.tab-splash-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 14px;
}

/* ── 탭 배너 (서재) ────────────────────────── */
.tab-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--warm-card);
    border: 1px solid var(--warm-border-light);
    border-radius: 18px;
    padding: 20px 28px;
    margin-bottom: 28px;
}
.tab-banner-img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(92,74,50,0.15));
}
.tab-banner-text h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--warm-text);
    margin-bottom: 4px;
}
.tab-banner-text p {
    font-size: 13px;
    color: var(--warm-text-light);
}
@media (max-width: 640px) {
    .tab-banner { flex-direction: column; text-align: center; gap: 12px; }
    .tab-banner-img { width: 80px; height: 80px; }
    .tab-splash-img { width: 160px; }
}

/* ── 반응형 (카드 시스템) ──────────────────── */
@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .world-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .tc-modal {
        max-width: 100%;
        max-height: 95vh;
    }
    .tc-card-image { min-height: 240px; }
    .tc-card-image img { width: 75%; }
    .card-collection-counter,
    .world-progress-bar {
        padding: 16px;
        border-radius: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Admin 모바일 메뉴
   ═══════════════════════════════════════════════════════════ */
.admin-mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--warm-border);
    border-radius: 8px;
    background: var(--warm-card);
    cursor: pointer;
    color: var(--warm-text-light);
    transition: all .15s;
    flex-shrink: 0;
}
.admin-mobile-menu-btn:hover { border-color: var(--warm-accent); color: var(--warm-accent); }
.admin-mobile-menu-btn svg { display: block; }

.admin-mobile-dropdown {
    display: none;
    background: var(--warm-header);
    border-bottom: 1px solid var(--warm-border);
    padding: 8px 14px 12px;
}
.admin-mobile-dropdown.open {
    display: block;
    animation: mobileMenuSlide 0.2s ease;
}
@keyframes mobileMenuSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.admin-mobile-dropdown a {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--warm-text);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
}
.admin-mobile-dropdown a:hover {
    background: var(--warm-accent-light);
}
.admin-mobile-dropdown-user {
    padding: 8px 12px 0;
    font-size: 12px;
    color: var(--warm-text-light);
    border-top: 1px solid var(--warm-border-light);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   세계관 모달
   ═══════════════════════════════════════════════════════════ */
.world-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 16px;
    overflow-y: auto;
    backdrop-filter: blur(3px);
}
.world-modal-overlay.active { display: flex; }
.world-modal {
    background: #fff;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: tcReveal 0.3s ease;
    overflow: hidden;
}
.world-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--gray-200);
}
.world-modal-emoji { font-size: 24px; flex-shrink: 0; }
.world-modal-title-wrap { flex: 1; min-width: 0; }
.world-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}
.world-modal-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-block;
    margin-top: 2px;
}
.world-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.world-modal-close:hover { background: var(--gray-200); color: var(--gray-700); }
.world-modal-body {
    padding: 16px 20px;
    max-height: 60vh;
    overflow-y: auto;
}
.world-modal-field {
    margin-bottom: 14px;
}
.world-modal-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 5px;
}
.world-modal-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.world-modal-input:focus { border-color: var(--warm-accent); }
.world-modal-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.world-modal-textarea:focus { border-color: var(--warm-accent); }
.world-modal-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}
.world-modal-select:focus { border-color: var(--warm-accent); }
.world-modal-row {
    display: flex;
    gap: 12px;
}
.world-modal-row > .world-modal-field { flex: 1; }
.world-modal-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* 연결된 카드 */
.wm-linked-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}
.wm-linked-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-600);
}
.wm-linked-chip.done { background: #dbeafe; color: #1d4ed8; }

/* 관계 편집 목록 */
.wr-list {
    max-height: 240px;
    overflow-y: auto;
}
.wr-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 12px;
}
.wr-item:last-child { border-bottom: none; }
.wr-item-emoji { font-size: 16px; }
.wr-item-info { flex: 1; min-width: 0; }
.wr-item-title { font-weight: 600; color: var(--gray-700); }
.wr-item-role { font-size: 10px; color: var(--gray-400); }
.wr-item-card { font-size: 11px; color: var(--gray-500); }
.wr-item-del {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.wr-item-del:hover { background: #fef2f2; color: #ef4444; }

/* ZIP 패키지 상태 */
.wm-zip-status {
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    min-height: 32px;
}
.wm-zip-empty {
    font-size: 12px;
    color: var(--gray-400);
}
.wm-zip-attached {}
.wm-zip-filename {
    font-size: 13px;
    font-weight: 600;
    color: var(--warm-text);
    margin-bottom: 2px;
}
.wm-zip-meta {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 6px;
}
.wm-zip-filelist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
}
.wm-zip-filelist li {
    font-size: 11px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--gray-500);
    padding: 2px 0;
    padding-left: 14px;
    position: relative;
}
.wm-zip-filelist li::before {
    content: '·';
    position: absolute;
    left: 2px;
    font-weight: 700;
    color: var(--warm-accent);
}
.wm-zip-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .world-modal {
        border-radius: 14px;
        max-width: 100%;
    }
    .world-modal-overlay {
        padding: 3vh 8px;
    }
    .world-modal-header {
        padding: 14px 14px 12px;
    }
    .world-modal-body {
        padding: 14px;
    }
    .world-modal-footer {
        padding: 12px 14px;
    }
    .world-modal-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .admin-mobile-menu-btn {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════════════════
   Admin 모바일 최적화
   ═══════════════════════════════════════════════════════════ */

/* ── 480px 이하: 스마트폰 ────────────────────────── */
@media (max-width: 480px) {
    /* 컨테이너 패딩 축소 */
    .admin-container {
        padding: 0 14px;
    }
    body.wide-mode .admin-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* 헤더: nav-links 숨기고, 사용자명 숨김 */
    .admin-header .admin-container {
        height: 48px;
    }
    .admin-nav-links {
        display: none;
    }
    .admin-user-name {
        display: none;
    }
    .admin-user {
        gap: 8px;
    }
    .admin-logo {
        font-size: 15px;
    }
    .admin-badge {
        font-size: 10px;
        padding: 1px 6px;
        margin-left: 4px;
    }
    .admin-wide-toggle {
        display: none;
    }

    /* 메인 패딩 축소 */
    .admin-main {
        padding: 20px 0 60px;
    }

    /* 탭 네비게이션: 스크롤 + 작은 사이즈 */
    .admin-nav {
        gap: 2px;
        margin-bottom: 16px;
        padding: 3px;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
    }
    .admin-nav-btn {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* 통계 행 */
    .admin-stat-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 20px;
    }
    .admin-stat-card {
        padding: 12px;
    }
    .admin-stat-num {
        font-size: 1.3rem;
    }

    /* 카드 컬렉션 카운터 */
    .card-collection-counter {
        padding: 14px 16px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .card-collection-header h2 {
        font-size: 15px;
    }
    .card-collection-header .cc-count {
        font-size: 18px;
    }
    .card-collection-legend {
        gap: 10px;
        font-size: 11px;
        flex-wrap: wrap;
    }

    /* 카드팩 헤더: 줄바꿈 */
    .card-pack-header {
        flex-wrap: wrap;
        gap: 6px 10px;
        margin-bottom: 10px;
    }
    .card-pack-name {
        font-size: 13px;
    }
    .card-pack-progress {
        flex-basis: 100%;
        order: 10;
        height: 3px;
    }
    .card-pack-ratio {
        font-size: 11px;
    }

    /* 카드 그리드: 2열 강제 */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* 카드 이미지/정보 축소 */
    .card-image-wrap {
        padding: 8px 10px 0;
    }
    .card-info {
        padding: 6px 8px 10px;
    }
    .card-name {
        font-size: 10px;
        margin-bottom: 4px;
    }
    .card-status-badge {
        font-size: 8px;
        padding: 1px 6px;
    }

    /* 세계관 카드 */
    .world-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .world-card {
        padding: 12px;
    }
    .world-card-emoji {
        font-size: 22px;
    }

    /* 카드 모달: 거의 전체화면 */
    .card-modal-overlay {
        padding-top: 8px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .tc-modal {
        max-width: 100%;
        max-height: 98vh;
    }
    .tc-card-image {
        min-height: 200px;
        padding: 16px 16px 0;
    }
    .tc-card-image img {
        width: 70%;
    }
    .tc-card-info {
        padding: 12px 16px 14px;
    }
    .tc-card-name {
        font-size: 15px;
    }
    .tc-dot {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .tc-panel {
        max-height: 35vh;
    }
    .tc-panel-section {
        padding: 12px 14px;
    }

    /* 섹션 블록 */
    .admin-section-block {
        margin-bottom: 16px;
    }
    .admin-section-label {
        font-size: 13px;
        gap: 6px;
    }

    /* 테이블 */
    .admin-table th {
        padding: 8px 10px;
        font-size: 11px;
    }
    .admin-table td {
        padding: 7px 10px;
        font-size: 12px;
    }

    /* SI Sub Category */
    .si-sub-title {
        padding: 12px 14px;
        font-size: 13px;
    }
    .si-sub-content {
        padding: 0 14px 14px;
    }

    /* 상세 카드 */
    .admin-detail-card {
        padding: 14px;
    }
    .admin-detail-card h4 {
        font-size: 13px;
    }
    .admin-detail-card p {
        font-size: 12px;
    }

    /* 타이틀/서브타이틀 */
    .admin-title {
        font-size: 1.4rem;
    }
    .admin-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    /* 버튼 */
    .btn-admin {
        padding: 7px 12px;
        font-size: 12px;
    }
    .admin-action-row {
        margin-top: 12px;
    }

    /* 탭 스플래시 */
    .tab-splash {
        padding: 32px 14px;
    }
    .tab-splash-img {
        width: 140px;
    }
    .tab-splash-title {
        font-size: 20px;
    }
    .tab-splash-desc {
        font-size: 13px;
    }

    /* 탭 배너 */
    .tab-banner {
        padding: 16px;
        gap: 10px;
        border-radius: 14px;
    }
    .tab-banner-img {
        width: 64px;
        height: 64px;
        border-radius: 12px;
    }
    .tab-banner-text h2 {
        font-size: 16px;
    }
    .tab-banner-text p {
        font-size: 12px;
    }

    /* resources 페이지 */
    .res-page-header {
        gap: 12px;
        margin-bottom: 20px;
    }
    .res-card-top {
        padding: 14px 14px 10px;
    }
    .res-field-row {
        grid-template-columns: 1fr;
    }
    .res-card-footer {
        padding: 10px 14px;
        flex-direction: column;
        align-items: stretch;
    }
    .res-download-btn {
        justify-content: center;
        padding: 10px 16px;
    }
    .res-list {
        gap: 12px;
    }

    /* 관리 그리드 */
    .admin-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }
    .admin-card {
        padding: 16px;
    }

    /* 관리 도구 */
    .admin-tools-grid {
        flex-direction: column;
    }
    .admin-tool-link {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 푸터 */
    .admin-footer {
        padding: 14px 0;
        font-size: 11px;
    }

    /* pre 태그 (네트워크 구성 등) */
    .admin-pre {
        font-size: 10px;
        overflow-x: auto;
    }

    /* 모달 편집 행 */
    .modal-edit-row {
        grid-template-columns: 1fr;
    }
}

/* ── 640px~768px: 태블릿 세로 ──────────────────── */
@media (min-width: 481px) and (max-width: 768px) {
    .admin-container {
        padding: 0 18px;
    }
    .admin-nav-links a {
        font-size: 11px;
        padding: 4px 8px;
    }
    .admin-user-name {
        display: none;
    }
    .admin-wide-toggle {
        display: none;
    }
    .admin-main {
        padding: 28px 0 60px;
    }
    .card-pack-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .card-pack-progress {
        flex-basis: 100%;
        order: 10;
    }
}
