:root {
    --bg: #0b0c0e;
    --surface: #16171a;
    --surface-2: #1e1f22;
    --line: #2b2d31;
    --text: #f2f3f5;
    --muted: #b5bac1;
    --subtle: #8e939b;
    --accent: #07f468;
    --accent-ink: #04130a;
    --blurple: #5865f2;
    --radius: 14px;
    --max: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo',
        'Malgun Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

/* 본문 속 링크는 줄 높이를 그대로 두고 누르는 영역만 넓힙니다 */
main p a,
.foot a {
    padding: 13px 0;
    margin: -13px 0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* 머리글 */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(11, 12, 14, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.top .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    min-width: 44px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 8px;
}

.nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-primary:hover {
    background: #2bff83;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--surface-2);
}

.btn-sm {
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
}

/* 첫 화면 */
.hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(900px 420px at 85% -10%, rgba(7, 244, 104, 0.12), transparent 60%);
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
}

.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(7, 244, 104, 0.18);
}

h1 {
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin: 0 0 18px;
}

h1 em {
    font-style: normal;
    color: var(--accent);
}

.lead {
    color: var(--muted);
    font-size: 18px;
    margin: 0 0 28px;
    max-width: 34em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats {
    display: flex;
    gap: 28px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.stats b {
    display: block;
    color: var(--text);
    font-size: 22px;
    letter-spacing: -0.02em;
}

/* 디스코드 메시지 미리보기 */
.preview {
    background: #313338;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid #3f4147;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.msg {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
}

.msg > img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.msg-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.msg-head b {
    color: var(--accent);
}

.app-tag {
    background: var(--blurple);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.msg-head time {
    color: #949ba4;
    font-size: 12px;
}

.mention {
    display: inline-block;
    margin: 2px 0 8px;
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
    border-radius: 3px;
    padding: 0 3px;
    font-weight: 600;
}

.embed {
    background: #2b2d31;
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    padding: 12px 16px 14px;
    font-size: 14px;
}

.embed-title {
    font-weight: 700;
    margin: 0 0 10px;
}

.fields {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 24px;
    margin: 0;
}

.field dt {
    font-weight: 700;
    font-size: 13px;
    color: #dbdee1;
}

.field dd {
    margin: 0;
    color: #dbdee1;
}

.field.full {
    grid-column: 1 / -1;
}

.field.full dd {
    color: #00a8fc;
    overflow-wrap: anywhere;
}

.field.full dd.plain {
    color: #dbdee1;
}

.msg-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.msg-buttons span {
    white-space: nowrap;
    background: #4e5058;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
}

.msg-buttons span::after {
    content: ' ↗';
    color: #c4c9ce;
}

/* 본문 구역 */
section {
    padding: 72px 0;
    border-bottom: 1px solid var(--line);
}

h2 {
    font-size: 30px;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 10px;
}

.section-lead {
    color: var(--muted);
    margin: 0 0 36px;
    max-width: 40em;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 800;
    margin-bottom: 14px;
}

.steps h3 {
    font-size: 18px;
    margin: 0 0 6px;
}

.steps p {
    color: var(--muted);
    margin: 0;
    font-size: 15px;
}

code,
kbd {
    font-family: ui-monospace, 'SF Mono', Consolas, monospace;
    font-size: 0.92em;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 6px;
    color: var(--text);
    white-space: nowrap;
}

/* 명령어 표 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th,
.table td {
    text-align: left;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table th {
    font-size: 13px;
    color: var(--subtle);
    font-weight: 600;
    background: var(--surface-2);
}

.table td:first-child {
    width: 34%;
}

.table td {
    color: var(--muted);
}

.note {
    margin: 16px 0 0;
    color: var(--subtle);
    font-size: 14px;
}

/* 권한·기준 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

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

.card p {
    color: var(--muted);
    margin: 0 0 12px;
    font-size: 15px;
}

.card p:last-child {
    margin-bottom: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 14px;
    list-style: none;
}

.chips li {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 14px;
}

.rules {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.rules li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.rules li:last-child {
    border-bottom: 0;
}

.rules b {
    color: var(--text);
    font-weight: 600;
}

/* 자주 묻는 질문 */
.faq {
    display: grid;
    gap: 10px;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 20px;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 0;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
}

.faq details[open] summary::after {
    content: '−';
}

.faq details p {
    margin: 0 0 18px;
    color: var(--muted);
}

/* 마지막 안내 */
.cta {
    text-align: center;
    border-bottom: 0;
}

.cta img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin-bottom: 16px;
}

.cta .actions {
    justify-content: center;
}

/* 바닥글 */
.foot {
    border-top: 1px solid var(--line);
    padding: 28px 0 40px;
    color: var(--subtle);
    font-size: 14px;
}

.foot .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
}

.foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

.foot a {
    color: var(--muted);
    text-decoration: none;
}

.foot a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* 약관·개인정보 문서 */
.doc {
    padding: 56px 0 72px;
    border-bottom: 0;
}

.doc .wrap {
    max-width: 760px;
}

.doc h1 {
    font-size: clamp(30px, 4vw, 40px);
}

.doc .meta {
    color: var(--subtle);
    font-size: 14px;
    margin: 0 0 36px;
}

.doc h2 {
    font-size: 21px;
    margin: 36px 0 10px;
}

.doc p,
.doc li {
    color: var(--muted);
}

.doc ul {
    padding-left: 20px;
}

.doc li {
    margin: 4px 0;
}

.doc li b {
    color: var(--text);
}

.not-found {
    min-height: 60vh;
    display: grid;
    place-items: center;
    text-align: center;
    border-bottom: 0;
}

@media (max-width: 860px) {
    .hero {
        padding: 44px 0 40px;
    }

    .hero .wrap,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero .wrap {
        gap: 36px;
    }

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

    section {
        padding: 52px 0;
    }

    .nav a.hide-sm {
        display: none;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 18px;
    }

    .top .wrap {
        gap: 12px;
    }

    .brand span {
        display: none;
    }

    .nav {
        gap: 0;
    }

    .nav a {
        padding: 10px 8px;
    }

    .lead {
        font-size: 17px;
    }

    .actions .btn {
        flex: 1 1 100%;
    }

    .stats {
        gap: 20px;
    }

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

    .table th:nth-child(2),
    .table td:nth-child(2) {
        display: none;
    }

    .table td:first-child {
        width: auto;
    }

    .table td,
    .table th {
        padding: 14px 16px;
    }

    .table .desc-sm {
        display: block;
        margin-top: 4px;
        font-size: 14px;
    }
}

@media (min-width: 561px) {
    .table .desc-sm {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}
