@import url('https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@1.0/nanumsquare.css');

* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f8ff;
    --bg-soft: #eef3ff;
    --card: rgba(255, 255, 255, 0.84);
    --card-solid: #ffffff;
    --text: #172033;
    --muted: #6b7890;
    --line: rgba(98, 112, 255, 0.18);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --purple: #7c3aed;
    --pink: #d946ef;
    --green: #12b981;
    --red: #ef4444;
    --shadow: 0 22px 70px rgba(65, 88, 208, 0.14);
    --shadow-soft: 0 12px 34px rgba(38, 99, 235, 0.10);
    --radius: 24px;

    --topbar-height: 82px;
    --layout-width: 1540px;
    --sidebar-width: 210px;
    --rightbar-width: 250px;
    --layout-gap: 28px;
    --content-width: calc(
        var(--layout-width)
        - var(--sidebar-width)
        - var(--rightbar-width)
        - (var(--layout-gap) * 2)
    );
}

/* 기본 */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'NanumSquare', 'Noto Sans KR', sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(124, 58, 237, 0.16), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.18), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f7f9ff 42%, #eef3ff 100%);
    color: var(--text);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 78%);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 상단바 공통 */

/* 로그인 후 상단바 */
.topbar {
    justify-content: space-between;
    padding: 0 max(24px, calc((100vw - var(--layout-width)) / 2));
    background: rgba(255, 255, 255, 0.80);
    border-bottom: 1px solid rgba(124, 58, 237, 0.14);
    backdrop-filter: blur(18px);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: min(100%, var(--layout-width));
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .35), rgba(124, 58, 237, .35), transparent);
}

.topbar > * {
    position: relative;
    z-index: 1;
}

/* 공개 페이지 플로팅 헤더 */
.landing-top {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    pointer-events: none;
}

.landing-inner {
    width: 100%;
    max-width: 1280px;

    height: 64px;

    margin: 0 auto;
    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 999px;

    background: rgba(255,255,255,.72);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid rgba(255,255,255,.55);

    box-shadow:
        0 12px 40px rgba(124,58,237,.08),
        0 4px 16px rgba(37,99,235,.08);

    pointer-events: auto;

    transition: all .25s ease;
}

/* landing-inner가 없는 기존 헤더도 자연스럽게 보이게 */
.landing-top > .brand:not(.brand-logo),
.landing-top > .landing-nav {
    position: relative;
    z-index: 1;
}

.landing-top > .brand:not(.brand-logo) {
    margin-right: auto;
}

.landing-top > .landing-nav {
    margin-left: auto;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(124, 58, 237, 0.16);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.10);
    backdrop-filter: blur(18px);
}

/* 브랜드 */
.brand {
    font-family: 'NanumSquare', 'Noto Sans KR', sans-serif;
    font-weight: 400;
    color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: -0.4px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;

    font-weight: 800;
    font-size: 15px;

    color: #4f46e5;
}

.brand-mark {
    width: 38px;
    height: 38px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 800;

    color: white;

    background: linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );
}

/* 네비게이션 */
.landing-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.landing-nav a {
    padding: 10px 14px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;

    color: #475569;

    transition: all .2s ease;
}

.landing-nav a:hover {
    background: rgba(124,58,237,.08);
    color: #7c3aed;
}

.landing-nav .login-link {
    color: var(--blue);
    font-weight: 900;
}
.nav-btn {
    background: linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );

    color: white !important;

    padding: 10px 18px;

    font-weight: 700;

    box-shadow:
        0 10px 20px rgba(124,58,237,.18);
}
.nav-btn,
.landing-nav .nav-btn {
    padding: 11px 16px;
    margin-left: 4px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border: none;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.mobile-nav-toggle {
    display: none;
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 13px;
}

/* 사용자 박스 */
.userbox {
    color: var(--muted);
    font-size: 14px;
}

.userbox a {
    margin-left: 15px;
    color: var(--blue);
    font-weight: 800;
}

/* 좌측 사이드바 */
.sidebar {
    position: fixed;
    top: calc(var(--topbar-height) + 28px);
    left: max(24px, calc(50% - (var(--layout-width) / 2)));
    width: var(--sidebar-width);
    max-height: calc(100vh - var(--topbar-height) - 54px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 28px;
    padding: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    z-index: 20;
}

.sidebar a {
    display: block;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 18px;
    color: #48566f;
    font-weight: 800;
    font-size: 14px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(124, 58, 237, 0.10));
    color: var(--purple);
    transform: translateX(2px);
}

/* 우측 사이드바 */
.right-rankbar {
    position: fixed;
    top: calc(var(--topbar-height) + 28px);
    right: max(24px, calc(50% - (var(--layout-width) / 2)));
    width: var(--rightbar-width);
    max-height: calc(100vh - var(--topbar-height) - 54px);
    overflow-y: auto;
    z-index: 19;
}

.right-rank-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 28px;
    padding: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.right-rank-head {
    margin-bottom: 14px;
}

.right-rank-head span {
    display: block;
    font-weight: 950;
    color: #111827;
    font-size: 17px;
}

.right-rank-head strong {
    display: inline-block;
    margin-top: 6px;
    color: var(--purple);
    font-size: 12px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.14);
    padding: 5px 9px;
    border-radius: 999px;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.10);
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-num {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
}

.rank-domain {
    min-width: 0;
    font-size: 13px;
    font-weight: 850;
    color: #3f4d66;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list li strong {
    font-size: 13px;
    color: var(--purple);
}

.rank-empty {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.rank-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: #8a96aa;
    line-height: 1.5;
}

/* 본문 레이아웃 */
.main {
    width: var(--content-width);
    margin-left: calc(
        max(24px, calc(50% - (var(--layout-width) / 2)))
        + var(--sidebar-width)
        + var(--layout-gap)
    );
    padding: calc(var(--topbar-height) + 34px) 0 56px;
}

.main > .card,
.main > .grid,
.main > form,
.main > .feature-grid {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 공개, 비회원, 랜딩형 본문 */
.guest-main {
    width: min(1180px, calc(100% - 48px));
    max-width: 1180px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 카드 */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    margin: 22px 0;
    backdrop-filter: blur(16px);
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
    letter-spacing: -0.5px;
}

.card h1 {
    font-size: 30px;
}

.card h2 {
    font-size: 22px;
}

.card p {
    color: var(--muted);
    line-height: 1.75;
}

/* 그리드, 통계 */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat {
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .56)),
        linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: var(--shadow-soft);
}

.stat span {
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

.stat strong {
    display: block;
    font-size: 30px;
    color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    margin-top: 8px;
}

/* 폼 */
input,
textarea,
select,
button,
.btn {
    font-family: 'NanumSquare', 'Noto Sans KR', sans-serif;
}

input,
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 15px 17px;
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    margin-bottom: 14px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.10);
}

input::placeholder,
textarea::placeholder {
    color: #9ba7bb;
}

textarea {
    line-height: 1.7;
}

select {
    appearance: none;
}

.card form,
form .card {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* 버튼 */
button,
.btn {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.20);
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

button:hover,
.btn:hover,
.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

.btn-sub {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(37, 99, 235, 0.22);
    color: var(--blue);
    box-shadow: none;
}

/* 안내, 뱃지 */
.alert {
    padding: 15px 17px;
    border-radius: 18px;
    margin-bottom: 18px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #b42318;
}

.success {
    background: rgba(18, 185, 129, 0.08);
    border-color: rgba(18, 185, 129, 0.20);
    color: #047857;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    margin: 3px;
}

.small-guide {
    font-size: 13px;
    color: #7b879d;
    margin-top: -6px;
}

/* 표 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .45);
    border-radius: 18px;
    overflow: hidden;
}

.table th,
.table td {
    border-bottom: 1px solid rgba(124, 58, 237, 0.10);
    padding: 15px;
    text-align: left;
    color: #3f4d66;
    vertical-align: middle;
}

.table th {
    color: #1f2a44;
    background: rgba(248, 250, 255, 0.8);
}

/* 로그인 */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    width: 420px;
}

/* 랜딩 히어로 */
.landing {
    padding-top: var(--topbar-height);
}

.hero {
    min-height: 720px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 48px;
    width: min(var(--layout-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 82px 0;
    position: relative;
    overflow: hidden;
}

.hero-upgraded {
    padding-top: 72px;
}

.hero-glow {
    position: absolute;
    width: 540px;
    height: 540px;
    background: radial-gradient(circle, rgba(124, 58, 237, .20), transparent 65%);
    top: 80px;
    left: -160px;
    pointer-events: none;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--purple);
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-radius: 999px;
    padding: 8px 12px;
    letter-spacing: 1.2px;
    font-size: 12px;
    font-weight: 950;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 65px);
    line-height: 1.05;
    margin: 0 0 24px;
    letter-spacing: -3px;
    color: #111827;
}

.hero-content h1 {
    position: relative;
}

.hero-content h1::after {
    content: "";
    display: block;
    width: 160px;
    height: 10px;
    margin-top: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, .22), rgba(124, 58, 237, .28), rgba(6, 182, 212, .18));
}

.hero p {
    max-width: 650px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 8px;
}

.hero-badges span {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(124, 58, 237, .16);
    color: #4c3b73;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}

.scan-form {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    max-width: 760px;
}

.scan-form input {
    margin-bottom: 0;
    height: 58px;
    font-size: 16px;
}

.scan-form button {
    min-width: 160px;
}

.hero-scan {
    padding: 10px;
    background: rgba(255, 255, 255, .70);
    border: 1px solid rgba(124, 58, 237, .16);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.hero-scan input,
.hero-scan input:focus {
    border: none;
    box-shadow: none;
    background: transparent;
}

.hero-note {
    margin-top: 18px;
    color: #7b879d;
    font-size: 14px;
}

.hero-panel {
    position: relative;
}

/* 터미널, 스캔 애니메이션 */
.terminal {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.terminal-head {
    height: 46px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
}

.terminal-head span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--purple);
    opacity: .75;
}

.terminal-body {
    padding: 28px;
    font-family: Consolas, monospace;
}

.terminal-body p {
    font-size: 15px;
    color: #56657d;
    margin: 0 0 14px;
}

.terminal-body .ok {
    color: var(--green);
    font-weight: 900;
}

.terminal-body p i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-radius: 50%;
    background: #7c3aed;
    box-shadow: 0 0 16px rgba(124, 58, 237, .5);
}

.terminal-body p.ok i {
    background: #12b981;
    box-shadow: 0 0 16px rgba(18, 185, 129, .5);
}

.terminal-animated {
    position: relative;
}

.terminal-animated .terminal-body p {
    opacity: 0;
    transform: translateY(8px);
    animation: logAppear 4.8s infinite;
}

.terminal-animated .terminal-body p:nth-child(1) { animation-delay: .1s; }
.terminal-animated .terminal-body p:nth-child(2) { animation-delay: .6s; }
.terminal-animated .terminal-body p:nth-child(3) { animation-delay: 1.1s; }
.terminal-animated .terminal-body p:nth-child(4) { animation-delay: 1.6s; }
.terminal-animated .terminal-body p:nth-child(5) { animation-delay: 2.1s; }
.terminal-animated .terminal-body p:nth-child(6) { animation-delay: 2.7s; }

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 46px;
    height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(37, 99, 235, .10), transparent);
    animation: scanMove 3.2s ease-in-out infinite;
    pointer-events: none;
}

.scan-orbit {
    width: 220px;
    height: 220px;
    margin: 0 auto -34px;
    position: relative;
    z-index: 3;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(124, 58, 237, .35);
    animation: orbitRotate 16s linear infinite;
}

.ring-two {
    inset: 28px;
    border-color: rgba(37, 99, 235, .32);
    animation-duration: 10s;
    animation-direction: reverse;
}

.scan-core {
    position: absolute;
    inset: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 50px rgba(124, 58, 237, .28);
}

.scan-core strong {
    font-size: 28px;
    letter-spacing: -1px;
}

.scan-core span {
    font-size: 12px;
    opacity: .8;
    font-weight: 900;
    letter-spacing: 2px;
}

/* 메인 콘텐츠 섹션 */
.home-section {
    width: min(var(--layout-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 74px 0;
}

.section-title {
    max-width: 760px;
    margin-bottom: 32px;
}

.section-title span,
.cta-section span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--purple);
    font-weight: 950;
    background: rgba(124, 58, 237, .08);
    border: 1px solid rgba(124, 58, 237, .14);
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 13px;
}

.section-title h2,
.cta-section h2 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -1.6px;
    color: #111827;
}

.section-title p,
.cta-section p {
    color: var(--muted);
    line-height: 1.85;
    font-size: 17px;
}

.feature-grid,
.info-grid,
.article-grid,
.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature-grid {
    width: min(var(--layout-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 80px;
}

.info-card,
.article-card,
.review-card {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 28px;
    padding: 26px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.info-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .13));
}

.info-card h3,
.article-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
    color: #172033;
    letter-spacing: -0.5px;
}

.info-card p,
.article-card p,
.review-card p {
    color: var(--muted);
    line-height: 1.8;
}

.article-tag {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--blue);
    background: rgba(37, 99, 235, .08);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.article-card a {
    display: inline-block;
    margin-top: 10px;
    color: var(--purple);
    font-weight: 950;
}

.review-card {
    position: relative;
}

.review-card::before {
    content: "“";
    position: absolute;
    top: 14px;
    right: 24px;
    font-size: 68px;
    color: rgba(124, 58, 237, .14);
    font-weight: 900;
}

.review-card strong {
    display: block;
    margin-top: 16px;
    color: #172033;
}

.cta-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 44px;
    margin-bottom: 80px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .68)),
        linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(124, 58, 237, .16));
    border: 1px solid rgba(124, 58, 237, .18);
    box-shadow: var(--shadow);
}

/* 글쓰기 */
.preview-box {
    background: #fff;
    color: #222;
    padding: 28px;
    border-radius: 20px;
    line-height: 1.8;
    border: 1px solid rgba(124, 58, 237, 0.12);
}

.preview-box h1,
.preview-box h2,
.preview-box h3 {
    color: #111;
}

.preview-box p {
    color: #333;
}

.preview-box img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 20px 0;
}

.preview-box a {
    color: var(--blue);
    text-decoration: underline;
}

.preview-box strong {
    font-weight: 900;
}

.count-guide {
    margin: -6px 0 14px;
    font-size: 13px;
    color: #7b879d;
}

.count-guide span {
    color: var(--purple);
    font-weight: 900;
}

.mini-guide {
    font-size: 14px;
    color: #56657d;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.14);
    padding: 12px 14px;
    border-radius: 14px;
}

.total-counter {
    margin: 18px 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(124, 58, 237, 0.07);
    border: 1px solid rgba(124, 58, 237, 0.16);
    color: #4c3b73;
}

.total-counter strong {
    color: var(--purple);
    font-size: 22px;
}

/* 순위 추적 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 950;
}

.rank-badge.top {
    background: linear-gradient(135deg, rgba(255, 214, 102, .24), rgba(124, 58, 237, .10));
    color: #7c3aed;
    border: 1px solid rgba(255, 184, 0, .35);
}

.rank-badge.good {
    background: rgba(37, 99, 235, .09);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, .18);
}

.rank-badge.normal {
    background: rgba(107, 120, 144, .09);
    color: #4b5563;
    border: 1px solid rgba(107, 120, 144, .16);
}

.rank-badge.out {
    background: rgba(239, 68, 68, .08);
    color: #b42318;
    border: 1px solid rgba(239, 68, 68, .16);
}

.inline-edit-form {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 260px;
}

.inline-edit-form input {
    margin-bottom: 0;
    min-width: 150px;
    padding: 10px 12px;
}

.inline-edit-form button,
.keyword-table button {
    white-space: nowrap;
    padding: 10px 13px;
}

.danger-btn {
    color: #b42318;
    border-color: rgba(239, 68, 68, .22);
}

.rank-link {
    color: var(--purple);
    font-weight: 900;
    text-decoration: underline;
}

/* SEO 도구 */
.seo-guide-list {
    color: var(--muted);
    line-height: 1.9;
    padding-left: 22px;
}

.seo-guide-list li {
    margin-bottom: 8px;
}

.seo-check-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.seo-check-grid div {
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.13);
    color: #3f4d66;
    font-weight: 800;
}

.sitemap-limit-notice {
    font-size: 14px;
    line-height: 1.7;
}

.sitemap-limit-notice a {
    color: var(--purple);
    font-weight: 950;
    text-decoration: underline;
}

/* 공개 도구 */
.public-tool-form {
    max-width: 860px;
}

.public-tool-form input {
    background: rgba(255, 255, 255, 0.96);
}

.guest-main .eyebrow {
    margin-bottom: 14px;
}

.public-rank-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.public-rank-form input {
    margin-bottom: 0;
}

.rank-result-big {
    text-align: center;
    padding: 34px;
    border-radius: 28px;
    background: rgba(124, 58, 237, .07);
    border: 1px solid rgba(124, 58, 237, .16);
}

.rank-result-big span {
    display: block;
    color: var(--muted);
    font-weight: 900;
}

.rank-result-big strong {
    display: block;
    margin: 10px 0;
    font-size: 58px;
    color: var(--purple);
}

.rank-result-big p {
    margin-bottom: 0;
}

.rank-out strong {
    color: #b42318;
}

/* 순위 올리기 */
.growth-score-circle {
    width: 126px;
    height: 126px;
    margin: 16px auto 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, .92) 0 52%, transparent 54%),
        conic-gradient(var(--purple) calc(var(--score, 75) * 1%), rgba(124, 58, 237, .12) 0);
    border: 1px solid rgba(124, 58, 237, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.growth-score-circle strong {
    font-size: 34px;
    color: var(--purple);
    line-height: 1;
}

.growth-score-circle span {
    font-size: 12px;
    color: var(--muted);
    font-weight: 900;
}

.growth-todo-list {
    display: grid;
    gap: 14px;
}

.growth-todo-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    background: rgba(37, 99, 235, .06);
    border: 1px solid rgba(124, 58, 237, .14);
}

.growth-todo-item strong {
    color: #172033;
}

.growth-todo-item p {
    margin: 6px 0 0;
}

.growth-todo-item span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(124, 58, 237, .10);
    color: var(--purple);
    font-weight: 950;
}

/* 로딩 */
.rank-loading,
.sitemap-loading {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(246, 248, 255, .72);
    backdrop-filter: blur(14px);
}

.rank-loading.active,
.sitemap-loading.active {
    display: flex;
}

.rank-loader-card,
.sitemap-loader-card {
    width: min(420px, calc(100% - 40px));
    padding: 34px;
    border-radius: 32px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(124, 58, 237, .16);
    box-shadow: var(--shadow);
    text-align: center;
}

.rank-loader-card h2,
.sitemap-loader-card h2 {
    margin: 20px 0 8px;
    color: #111827;
}

.rank-loader-card p,
.sitemap-loader-card p {
    margin: 0;
    color: var(--muted);
}

.rank-orbit,
.sitemap-orbit {
    width: 118px;
    height: 118px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px dashed rgba(124, 58, 237, .42);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rankSpin 1.8s linear infinite;
    position: relative;
}

.sitemap-orbit {
    border-color: rgba(37, 99, 235, .42);
}

.rank-orbit::before,
.sitemap-orbit::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 4px;
    right: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 0 24px rgba(124, 58, 237, .45);
}

.rank-orbit span,
.sitemap-orbit span {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    animation: rankReverse 1.8s linear infinite;
}

.loading-lines {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.loading-lines i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7c3aed;
    animation: dotPulse 1s ease-in-out infinite;
}

.loading-lines i:nth-child(2) {
    animation-delay: .15s;
}

.loading-lines i:nth-child(3) {
    animation-delay: .3s;
}

/* 애니메이션 */
@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logAppear {
    0% { opacity: 0; transform: translateY(8px); }
    18% { opacity: 1; transform: translateY(0); }
    78% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-4px); }
}

@keyframes scanMove {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    55% { transform: translateY(230px); opacity: 1; }
    100% { transform: translateY(330px); opacity: 0; }
}

@keyframes rankSpin {
    to { transform: rotate(360deg); }
}

@keyframes rankReverse {
    to { transform: rotate(-360deg); }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: .35;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-6px);
    }
}

/* 중간 화면: 오른쪽바 숨기고 2열 */
@media (max-width: 1380px) {
    :root {
        --layout-width: 1180px;
        --content-width: calc(var(--layout-width) - var(--sidebar-width) - var(--layout-gap));
    }

    .right-rankbar {
        display: none;
    }

    .sidebar {
        left: max(24px, calc(50% - (var(--layout-width) / 2)));
    }

    .main {
        width: var(--content-width);
        margin-left: calc(
            max(24px, calc(50% - (var(--layout-width) / 2)))
            + var(--sidebar-width)
            + var(--layout-gap)
        );
    }
}

/* 모바일 네비게이션 */
@media (max-width: 980px) {
    .landing-inner {
        position: relative;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .landing-inner .landing-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        padding: 12px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(124, 58, 237, 0.16);
        box-shadow: var(--shadow);
        backdrop-filter: blur(18px);
        flex-direction: column;
        align-items: stretch;
    }

    body.nav-open .landing-inner .landing-nav {
        display: flex;
    }

    .landing-inner .landing-nav a,
    .landing-inner .landing-nav .nav-btn {
        display: block;
        text-align: center;
        margin-left: 0;
    }
}

/* 태블릿/모바일 */
@media (max-width: 900px) {
    .sidebar,
    .right-rankbar {
        display: none;
    }

    .topbar,
    .landing-top {
        padding: 0 18px;
    }

    .main {
        width: calc(100% - 36px);
        margin-left: auto;
        margin-right: auto;
        padding: calc(var(--topbar-height) + 12px) 0 44px;
    }

    .main > .card,
    .main > .grid,
    .main > form,
    .main > .feature-grid {
        max-width: none;
    }

    .grid,
    .seo-check-grid,
    .info-grid,
    .article-grid,
    .review-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        grid-template-columns: 1fr;
        width: calc(100% - 36px);
        padding: 60px 0;
    }

    .scan-form {
        flex-direction: column;
    }

    .feature-grid {
        width: calc(100% - 36px);
        padding-bottom: 60px;
    }

    .hero h1 {
        letter-spacing: -1.6px;
    }

    .home-section {
        width: calc(100% - 36px);
        padding: 52px 0;
    }

    .cta-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
    }

    .scan-orbit {
        margin-top: 20px;
    }

    .keyword-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .inline-edit-form {
        min-width: 240px;
    }

    .public-rank-form {
        grid-template-columns: 1fr;
    }
}

/* 사이트 제작 페이지 */
.build-page {
    padding-top: 120px;
}

.build-hero {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 44px;
    align-items: center;
    position: relative;
}

.build-glow {
    position: absolute;
    width: 520px;
    height: 520px;
    left: -180px;
    top: 40px;
    background: radial-gradient(circle, rgba(124,58,237,.24), transparent 66%);
    pointer-events: none;
}

.build-chip {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(17,24,39,.06);
    border: 1px solid rgba(124,58,237,.18);
    color: var(--purple);
    font-weight: 950;
    font-size: 12px;
    letter-spacing: 1.4px;
}

.build-copy h1 {
    margin: 22px 0;
    font-size: clamp(42px, 6vw, 58px);
    line-height: 1.03;
    letter-spacing: -3px;
    color: #111827;
}

.build-copy p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

.build-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.build-panel {
    position: relative;
}

.code-window {
    border-radius: 32px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15,23,42,.92), rgba(49,46,129,.90));
    box-shadow: 0 34px 90px rgba(49,46,129,.24);
    border: 1px solid rgba(255,255,255,.16);
}

.code-head {
    height: 54px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.72);
}

.code-head span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    opacity: .55;
}

.code-head b {
    margin-left: 10px;
    font-size: 13px;
}

.code-body {
    padding: 32px;
}

.code-body p {
    margin: 0 0 18px;
    color: rgba(255,255,255,.84);
    font-weight: 800;
}

.code-body em {
    display: inline-flex;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #a5b4fc;
    font-style: normal;
}

.build-section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 78px 0;
}

.build-title {
    max-width: 760px;
    margin-bottom: 30px;
}

.build-title span {
    color: var(--purple);
    font-weight: 950;
}

.build-title h2,
.build-dark h2,
.build-cta h2 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
    letter-spacing: -1.8px;
}

.build-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.build-card {
    padding: 28px;
    border-radius: 30px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(124,58,237,.14);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.build-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.build-card p,
.build-dark p,
.build-cta p {
    color: var(--muted);
    line-height: 1.8;
}

.build-dark {
    padding: 52px;
    border-radius: 38px;
    background:
        radial-gradient(circle at top right, rgba(124,58,237,.28), transparent 40%),
        linear-gradient(135deg, #111827, #312e81);
    color: white;
}

.build-dark h2 {
    color: white;
}

.build-dark p {
    max-width: 760px;
    color: rgba(255,255,255,.76);
    font-size: 17px;
}

.build-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.build-steps div {
    padding: 24px;
    border-radius: 28px;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(124,58,237,.14);
    box-shadow: var(--shadow-soft);
}

.build-steps b {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    margin-bottom: 16px;
}

.build-steps strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.build-steps p {
    color: var(--muted);
    line-height: 1.7;
}

.build-cta {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto 90px;
    padding: 46px;
    border-radius: 38px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.66)),
        linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.18));
    border: 1px solid rgba(124,58,237,.18);
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .build-page {
        padding-top: 96px;
    }

    .build-hero,
    .build-grid,
    .build-steps {
        grid-template-columns: 1fr;
    }

    .build-hero,
    .build-section,
    .build-cta {
        width: calc(100% - 36px);
    }

    .build-copy h1 {
        letter-spacing: -1.6px;
    }

    .build-dark,
    .build-cta {
        padding: 30px;
    }
}
@media (max-width: 900px) {
    .card {
        overflow: hidden;
    }

    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .table th,
    .table td {
        white-space: nowrap;
        min-width: 110px;
    }

    .table td:nth-child(2),
    .table th:nth-child(2) {
        min-width: 150px;
        white-space: normal;
        word-break: keep-all;
    }
}
@media (max-width: 900px) {
    .sidebar {
        display: flex !important;
        position: fixed;
        top: 86px;
        left: 18px;
        right: 18px;
        width: auto;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 10px;
        border-radius: 22px;
        z-index: 25;
        white-space: nowrap;
    }

    .sidebar a {
        flex: 0 0 auto;
        margin-bottom: 0;
        padding: 11px 14px;
        font-size: 13px;
        border-radius: 999px;
        background: rgba(255,255,255,.55);
    }

    .main {
        padding-top: 166px;
    }
}