.note {
    max-width: 900px;
}

.note h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 34px;
}

.note-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: -16px 0 32px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.reaction-form {
    margin: 0;
}

.note-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--panel-soft) 86%, transparent),
        var(--panel)
    );
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(54, 42, 29, 0.055);
    padding: 8px 13px;
    cursor: pointer;
    font-weight: 800;
    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}

.note-action-button:hover {
    transform: translateY(-1px);
}

.note-action-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 56%, transparent);
    color: var(--accent-dark);
    font-size: 14px;
    line-height: 1;
}

.note-action-text {
    line-height: 1;
}

.note-action-button strong {
    min-width: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 13%, var(--panel));
    color: var(--accent-dark);
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.note-action-button:hover,
.note-action-button.active,
.note-action-button.copied {
    border-color: var(--accent);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 13%, var(--panel)),
        var(--panel)
    );
}

.note-action-button.active .note-action-icon,
.note-action-button.copied .note-action-icon {
    background: var(--accent);
    color: #fff;
}

.note-action-button:disabled {
    cursor: default;
    opacity: 0.82;
}

.note-action-button.loading {
    pointer-events: none;
}

.markdown {
    font-size: 17px;
    line-height: 1.75;
}

.markdown h1,
.markdown h2,
.markdown h3 {
    margin: 1.8em 0 0.5em;
    line-height: 1.18;
}

.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre {
    margin: 0 0 1.1em;
}

.markdown a {
    color: var(--accent-dark);
    border-bottom: 1px solid rgba(189, 75, 58, 0.35);
}

.markdown code {
    border-radius: 6px;
    background: transparent;
    padding: 2px 5px;
}

.markdown pre {
    overflow: auto;
    background: #1f2933;
    color: #f6efe3;
    padding: 16px;
}

.markdown hr {
    margin: 28px 0;
    border: 0;
}

.markdown blockquote {
    border-left: 4px solid var(--accent);
    background: color-mix(in srgb, var(--panel) 86%, var(--accent) 14%);
    padding: 12px 16px;
    color: var(--muted);
}

.markdown table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.markdown th,
.markdown td {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.markdown th {
    background: color-mix(in srgb, var(--line) 62%, var(--panel) 38%);
    font-weight: 800;
}

.html-document img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.html-document table {
    width: 100%;
    border-collapse: collapse;
}

.html-document th,
.html-document td {
    border: 1px solid var(--line);
    padding: 9px 10px;
    text-align: left;
}

.html-document .cp-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 0 24px;
    color: #202124;
    line-height: 1.72;
}

.html-document .cp-disclosure {
    margin: 0 0 22px;
    padding: 13px 15px;
    border-left: 4px solid #f97316;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 14px;
}

.html-document .cp-note {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.html-document .cp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0 38px;
    align-items: stretch;
}

.html-document .cp-product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.html-document .cp-product-card:hover {
    transform: translateY(-3px);
    border-color: #b7c2d0;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

.html-document .cp-product-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    border-bottom: 0;
}

.html-document .cp-rank {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.html-document .cp-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    padding: 22px;
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.html-document .cp-product-card img {
    display: block;
    width: 100%;
    max-height: 190px;
    object-fit: contain;
    border-radius: 0;
}

.html-document .cp-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 15px 15px 16px;
}

.html-document .cp-card-badges,
.html-document .cp-card-points,
.html-document .cp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.html-document .cp-card-badges span {
    padding: 4px 7px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
}

.html-document .cp-product-card strong {
    display: -webkit-box;
    min-height: 64px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.html-document .cp-card-price {
    display: block;
    color: #dc2626;
    font-size: 21px;
    font-weight: 900;
}

.html-document .cp-card-points {
    margin: 0;
    padding: 0;
    list-style: none;
}

.html-document .cp-card-points li {
    padding: 5px 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
}

.html-document .cp-product-card em {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: auto;
    background: #ef4444;
    color: #fff;
    font-style: normal;
    font-weight: 800;
}

.html-document .cp-detail {
    margin: 0 0 38px;
    padding: 26px 0 0;
    border-top: 1px solid #dbe2ea;
}

.html-document .cp-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.html-document .cp-detail-head h2 {
    margin: 4px 0 8px;
}

.html-document .cp-detail-head strong {
    color: #dc2626;
    font-size: 24px;
    white-space: nowrap;
}

.html-document .cp-kicker {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.html-document .cp-detail-angle {
    margin: 0;
    color: #334155;
    font-weight: 700;
}

.html-document .cp-detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 22px;
    align-items: start;
}

.html-document .cp-detail img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: #fff;
    border-radius: 0;
}

.html-document .cp-spec-list {
    display: grid;
    gap: 9px;
    margin: 0 0 14px;
}

.html-document .cp-spec-list p {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.html-document .cp-spec-list b {
    color: #475569;
    font-weight: 800;
}

.html-document .cp-spec-list span {
    color: #111827;
}

.html-document .cp-page-basis {
    margin: 12px 0;
    padding: 12px 14px;
    border-left: 4px solid #f97316;
    background: #fff7ed;
    color: #7c2d12;
}

.html-document .cp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    background: #ef4444;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 0;
}

.html-document .cp-tags {
    margin-top: 24px;
}

.html-document .cp-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
}

@media (max-width: 900px) {
    .html-document .cp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .html-document .cp-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .html-document .cp-grid {
        grid-template-columns: 1fr;
    }

    .html-document .cp-detail-head {
        display: block;
    }

    .html-document .cp-detail-head strong {
        display: block;
        margin-top: 8px;
    }

    .html-document .cp-spec-list p {
        grid-template-columns: 1fr;
    }
}

.ad-slot {
    margin: 34px 0 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 70%, transparent);
    padding: 18px 0;
    overflow: hidden;
}

.in-article-ad {
    min-height: 120px;
}

.backlinks {
    max-width: 900px;
    margin-top: 52px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.backlinks h2 {
    font-size: 18px;
}

.backlinks a {
    display: inline-flex;
    margin: 0 8px 8px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 9px 11px;
}

/* =========================
   Docs Content Page
========================= */

.doc-layout-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.doc-content-page {
    min-width: 0;
    max-width: 860px;
}

.doc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 6px 0 22px;
    color: var(--muted);
    font-size: 12px;
}

.doc-breadcrumb a {
    color: var(--muted);
}

.doc-breadcrumb a:hover {
    color: var(--accent-dark);
}

.doc-breadcrumb strong {
    color: var(--ink);
    font-weight: 800;
}

.doc-content-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.doc-kicker {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.doc-content-head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 5vw, 52px);
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.doc-content-head p {
    max-width: 720px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.doc-head-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

.doc-info-box {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 22px 0 22px;
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--accent) 8%, var(--panel)),
        var(--panel)
    );
    padding: 14px 16px;
}

.doc-info-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.doc-info-box strong {
    display: block;
    margin-bottom: 3px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 900;
}

.doc-info-box p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.doc-info-box button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
}

.doc-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.doc-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.doc-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 30px;
}

.doc-tag-row a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 6%, var(--panel));
    color: var(--accent-dark);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.doc-body {
    color: var(--ink);
}

.doc-body > *:first-child {
    margin-top: 0;
}

.doc-body h2 {
    margin-top: 42px;
    padding-top: 14px;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.doc-body h3 {
    margin-top: 30px;
    font-size: 18px;
}

.doc-body p {
    color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.doc-body ul,
.doc-body ol {
    padding-left: 22px;
}

.doc-body li + li {
    margin-top: 5px;
}

.doc-body pre {
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.doc-body code {
    font-size: 0.92em;
}

.doc-body table {
    font-size: 14px;
}

.doc-related-section {
    margin-top: 54px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.doc-related-section h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.doc-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.doc-related-grid a {
    display: grid;
    gap: 7px;
    min-height: 100px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: 14px;
}

.doc-related-grid a:hover {
    border-color: var(--accent);
}

.doc-related-grid strong {
    color: var(--ink);
    font-size: 14px;
}

.doc-related-grid span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Right TOC */

.doc-right-toc {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 14px;
    align-self: start;
    min-width: 0;
}

.doc-toc-card {
    border-left: 1px solid var(--line);
    padding-left: 16px;
}

.doc-toc-title {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.doc-toc-list {
    display: grid;
    gap: 2px;
}

.doc-toc-list a,
.doc-toc-list span {
    display: block;
    border-radius: 8px;
    color: var(--muted);
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.35;
}

.doc-toc-list a:hover,
.doc-toc-list a.active {
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
    color: var(--accent-dark);
}

.doc-toc-list a[data-level='3'] {
    padding-left: 18px;
}

.doc-feedback-buttons {
    display: flex;
    gap: 8px;
}

.doc-feedback-form {
    margin: 0;
}

.doc-feedback-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 64px;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.doc-feedback-buttons button strong {
    min-width: 20px;
    font-size: 12px;
}

.doc-feedback-buttons button:hover,
.doc-feedback-buttons button.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.doc-feedback-buttons button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.doc-feedback-status {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.doc-side-links {
    display: grid;
    gap: 4px;
}

.doc-side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    color: var(--muted);
    padding: 7px 8px;
    font-size: 12px;
}

.doc-side-links a:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
    color: var(--accent-dark);
}

@media (max-width: 1080px) {
    .doc-layout-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .doc-right-toc {
        display: none;
    }

    .doc-content-page {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .doc-content-head {
        display: grid;
    }

    .doc-head-actions {
        justify-content: flex-start;
    }

    .doc-info-box {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .doc-info-box button {
        display: none;
    }

    .doc-related-grid {
        grid-template-columns: 1fr;
    }
}
.doc-toc-list a[data-level='3'] {
    position: relative;
    margin-left: 10px;
    padding-left: 22px;
    color: color-mix(in srgb, var(--muted) 88%, transparent);
    font-size: 12px;
}

.doc-toc-list a[data-level='3']::before {
    content: 'ㄴ';
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    color: color-mix(in srgb, var(--muted) 70%, transparent);
    font-size: 11px;
    font-weight: 800;
}

.doc-toc-list a[data-level='3']:hover,
.doc-toc-list a[data-level='3'].active {
    color: var(--accent-dark);
}

.doc-toc-list a[data-level='3']:hover::before,
.doc-toc-list a[data-level='3'].active::before {
    color: var(--accent-dark);
}

.doc-body img.doc-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 14px;
    object-fit: contain;
}

.doc-body p > img.doc-image:only-child {
    margin-top: 28px;
    margin-bottom: 28px;
}

.demo-frame-wrap {
    width: 100%;
    max-width: 520px;
    margin: 24px auto;
    border-radius: 24px;
    overflow: hidden;
    background: #fff3c9;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.demo-frame-wrap iframe {
    width: 100%;
    min-height: 760px;
    border: 0;
    display: block;
}

.doc-body.markdown .cp-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px;
    color: #202124;
    font-family: Arial, 'Noto Sans KR', sans-serif;
    line-height: 1.7;
}

.doc-body.markdown .cp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0 34px;
}

.doc-body.markdown .cp-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.doc-body.markdown .cp-card a {
    display: block;
    padding: 14px;
    color: inherit;
    text-decoration: none;
}

.doc-body.markdown .cp-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
}

.doc-body.markdown .cp-card strong {
    display: block;
    min-height: 48px;
    margin: 12px 0 8px;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
}

.doc-body.markdown .cp-card span {
    display: block;
    color: #ef4444;
    font-size: 20px;
    font-weight: 800;
}

.doc-body.markdown .cp-detail {
    margin: 0 0 38px;
    padding-top: 26px;
    border-top: 1px solid #e5e7eb;
}

.doc-body.markdown .cp-detail h2 {
    font-size: 24px;
    line-height: 1.4;
    margin: 0 0 14px;
    color: #111827;
}

.doc-body.markdown .cp-detail h3 {
    font-size: 18px;
    margin: 18px 0 8px;
    color: #1f2937;
}

.doc-body.markdown .cp-detail img {
    display: block;
    width: min(420px, 100%);
    margin: 0 auto 18px;
    object-fit: contain;
}

.doc-body.markdown .cp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    background: #ef4444;
    color: #fff !important;
    text-decoration: none;
    font-weight: 800;
}

.doc-body.markdown .cp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    color: #4b5563;
}

.doc-body.markdown .cp-tags span {
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 13px;
}

@media (max-width: 720px) {
    .doc-body.markdown .cp-grid {
        grid-template-columns: 1fr;
    }

    .doc-body.markdown .cp-wrap {
        padding: 18px;
    }
}
