.kdn-board {
    color: #0f172a;
    font-family: "Nexon Gothic", "NanumSquare", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.kdn-board-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 26px;
}

.kdn-board-head span,
.kdn-write-title span,
.kdn-view-head span {
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.kdn-board-head h1,
.kdn-write-title h1,
.kdn-view-head h1 {
    margin: 8px 0 0;
    color: #0f172a;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.kdn-board-actions,
.kdn-view-actions,
.kdn-write-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kdn-board-actions a,
.kdn-view-actions a,
.kdn-write-actions a,
.kdn-write-actions button,
.kdn-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #1d4ed8;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.kdn-board-actions a:first-child,
.kdn-write-actions button {
    background: #e60012;
}

.kdn-cate {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.kdn-cate a {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 900;
}

.kdn-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.kdn-card {
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
}

.kdn-card-thumb {
    position: relative;
    display: block;
    background: #07111d;
}

.kdn-card-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.kdn-card-body {
    padding: 22px;
}

.kdn-card-body em {
    color: #1d4ed8;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.kdn-video-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 8px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    background: #e60012;
    font-size: 11px;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

.kdn-card-body h2 {
    margin: 10px 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.28;
    letter-spacing: -0.04em;
    word-break: keep-all;
}

.kdn-board-head p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 17px;
    line-height: 1.65;
    word-break: keep-all;
}

.kdn-card-body p {
    min-height: 52px;
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.kdn-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.kdn-search {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #dbe3ef;
    border-radius: 24px;
    background: #fff;
}

.kdn-empty-board {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 16px 0 0;
    padding: 56px 24px;
    border: 1px dashed #bfdbfe;
    border-radius: 28px;
    color: #475569;
    background: linear-gradient(135deg, #f8fbff, #eff6ff);
    text-align: center;
}

.kdn-empty-board strong {
    color: #0f172a;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.kdn-empty-board p {
    margin: 0;
    line-height: 1.7;
}

.kdn-empty-board a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    color: #fff;
    background: #1d4ed8;
    font-weight: 900;
}

.kdn-search form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kdn-search select,
.kdn-search input {
    min-height: 44px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 0 14px;
    font: inherit;
}

.kdn-search input {
    flex: 1;
    min-width: 220px;
}

.kdn-view {
    max-width: 980px;
    margin: 0 auto;
}

.kdn-view-head {
    margin-bottom: 26px;
}

.kdn-view-head p {
    margin: 16px 0 0;
    color: #64748b;
    font-size: 20px;
    line-height: 1.65;
}

.kdn-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 18px;
    color: #64748b;
    font-weight: 800;
}

.kdn-view-cover {
    overflow: hidden;
    margin: 0 0 32px;
    border-radius: 30px;
    background: #07111d;
}

.kdn-view-cover img {
    width: 100%;
    max-height: 680px;
    object-fit: cover;
}

.kdn-view-youtube {
    overflow: hidden;
    position: relative;
    margin: 0 0 32px;
    border-radius: 30px;
    background: #07111d;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.kdn-view-youtube::before {
    display: block;
    padding-top: 56.25%;
    content: "";
}

.kdn-view-youtube iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.kdn-view-content {
    color: #111827;
    font-size: 19px;
    line-height: 1.95;
    word-break: keep-all;
}

.kdn-import-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 30px 0;
}

.kdn-import-gallery figure {
    overflow: hidden;
    margin: 0;
    border: 1px solid #e5ebf5;
    border-radius: 22px;
    background: #f8fafc;
}

.kdn-import-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #e2e8f0;
}

.kdn-import-gallery figcaption {
    padding: 11px 13px 13px;
    color: #526173;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.kdn-view-content img {
    height: auto;
    margin: 28px auto;
    border-radius: 22px;
}

.kdn-view-video-wrap {
    margin: 30px 0;
}

.kdn-view-content video.kdn-view-video {
    display: block;
    width: 100%;
    max-height: 620px;
    border-radius: 22px;
    background: #07111d;
}

.kdn-view-files {
    margin-top: 32px;
    padding: 22px;
    border-radius: 24px;
    background: #f8fbff;
}

.kdn-view-files h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.kdn-view-files ul {
    margin: 0;
    padding-left: 20px;
}

.kdn-view-actions {
    justify-content: space-between;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #dbe3ef;
}

.kdn-write {
    max-width: 1180px;
    margin: 0 auto;
}

.kdn-write-title {
    margin-bottom: 24px;
}

.kdn-write-form {
    display: grid;
    gap: 16px;
}

.kdn-write-grid {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 14px;
}

.kdn-write-box,
.kdn-editor-box,
.kdn-photo-bank {
    border: 1px solid #dbe3ef;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
}

.kdn-write-box {
    padding: 20px;
}

.kdn-write-box label,
.kdn-photo-bank label {
    display: grid;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.kdn-write-box input,
.kdn-write-box select,
.kdn-write-box textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 12px 14px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}

.kdn-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.kdn-editor-box {
    overflow: hidden;
}

.kdn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid #dbe3ef;
    background: #f8fbff;
}

.kdn-toolbar button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.kdn-editor-drop {
    min-height: 560px;
    padding: 20px;
    border: 2px dashed rgba(29, 78, 216, 0.22);
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.kdn-editor-drop.is-dragover,
.kdn-upload-drop.is-dragover {
    border-color: #1d4ed8;
    background: #eff6ff;
}

.kdn-editor {
    min-height: 510px;
    outline: none;
    color: #111827;
    caret-color: #1d4ed8;
    font-size: 18px;
    line-height: 1.9;
}

.kdn-editor-drop-caret {
    display: inline-block;
    width: 4px;
    height: 1.7em;
    margin: 0 3px;
    border-radius: 999px;
    background: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.16);
    vertical-align: text-bottom;
    animation: kdn-editor-caret-pulse 0.9s ease-in-out infinite;
}

@keyframes kdn-editor-caret-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.42;
    }
}

.kdn-editor p {
    margin: 0 0 18px;
}

.kdn-editor figure {
    position: relative;
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 22px;
    background: #fff;
}

.kdn-editor figure.is-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.kdn-photo-figure-tools {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    gap: 6px;
}

.kdn-photo-figure-tools button,
.kdn-file-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.kdn-photo-figure-tools button[data-kdn-delete-photo],
.kdn-file-tool.danger {
    background: #dc2626;
}

.kdn-editor figure img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    background: #07111d;
}

.kdn-editor figure video {
    display: block;
    width: 100%;
    max-height: 620px;
    background: #07111d;
}

.kdn-video-muted-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 0;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.kdn-video-muted-option input {
    width: 16px;
    height: 16px;
}

.kdn-editor figcaption {
    padding: 12px 16px;
    color: #64748b;
    font-size: 14px;
}

.kdn-photo-bank {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.kdn-upload-drop {
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 2px dashed rgba(29, 78, 216, 0.26);
    border-radius: 22px;
    text-align: center;
    color: #64748b;
    background: #f8fbff;
    cursor: pointer;
}

.kdn-upload-drop strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
}

.kdn-upload-drop input {
    display: none;
}

.kdn-file-slots {
    display: grid;
    gap: 10px;
    max-height: 340px;
    overflow: auto;
}

.kdn-file-slot {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    font-size: 13px;
}

.kdn-file-slot input[type="file"],
.kdn-file-slot input[type="text"] {
    width: 100%;
}

.kdn-drop-shield {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 24px;
    color: #fff;
    background: rgba(7, 17, 29, 0.72);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.kdn-drop-shield.is-visible {
    display: grid;
}

.kdn-drop-shield div {
    width: min(560px, 100%);
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
}

.kdn-file-slot.is-filled {
    border-color: rgba(29, 78, 216, 0.48);
    background: #eff6ff;
}

.kdn-file-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.kdn-file-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kdn-photo-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 17, 29, 0.78);
    backdrop-filter: blur(12px);
}

.kdn-photo-editor-modal.is-open {
    display: flex;
}

.kdn-photo-editor-panel {
    width: min(1180px, 100%);
    max-height: min(92vh, 920px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: #f8fafc;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.kdn-photo-editor-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    color: #fff;
    background: linear-gradient(135deg, #07111d, #0b3b77);
}

.kdn-photo-editor-panel header span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.kdn-photo-editor-panel header h3 {
    margin: 4px 0 0;
    color: #fff;
    font-size: 24px;
}

.kdn-photo-editor-panel header button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 24px;
    cursor: pointer;
}

.kdn-photo-editor-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    padding: 20px;
}

.kdn-photo-editor-stage {
    position: relative;
    display: grid;
    min-height: 520px;
    place-items: center;
    overflow: hidden;
    border-radius: 22px;
    background: #07111d;
}

.kdn-photo-editor-stage canvas {
    max-width: 100%;
    max-height: 680px;
}

.kdn-photo-crop-box {
    position: absolute;
    border: 2px solid #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    box-shadow: 0 0 0 9999px rgba(7, 17, 29, 0.38);
    pointer-events: none;
}

.kdn-photo-crop-box.mode-mosaic {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
}

.kdn-photo-crop-box.mode-erase {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.kdn-photo-editor-modal.is-cropping .kdn-photo-editor-stage {
    cursor: crosshair;
}

.kdn-photo-editor-controls {
    display: grid;
    align-content: start;
    gap: 12px;
}

.kdn-photo-editor-controls button,
.kdn-photo-editor-actions button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    color: #1e293b;
    background: #e2e8f0;
    font-weight: 900;
    cursor: pointer;
}

.kdn-photo-editor-controls button.is-active {
    color: #fff;
    background: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.kdn-photo-editor-controls label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 900;
}

.kdn-photo-editor-controls input[type="range"] {
    width: 100%;
}

.kdn-photo-editor-actions {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.kdn-photo-editor-actions .primary {
    color: #fff;
    background: #1d4ed8;
}

.kdn-photo-editor-actions [data-kdn-photo-delete] {
    color: #fff;
    background: #dc2626;
}

.kdn-write-actions {
    justify-content: flex-end;
    padding-top: 10px;
}

.empty_table {
    padding: 60px 20px;
    border: 1px dashed #dbe3ef;
    border-radius: 24px;
    text-align: center;
    color: #64748b;
    background: #fff;
}

@media (max-width: 980px) {
    .kdn-list-grid,
    .kdn-write-grid,
    .kdn-editor-layout {
        grid-template-columns: 1fr;
    }

    .kdn-photo-editor-body {
        grid-template-columns: 1fr;
    }

    .kdn-photo-editor-stage {
        min-height: 360px;
    }
}

@media (max-width: 720px) {
    .kdn-import-gallery {
        grid-template-columns: 1fr;
    }

    .kdn-board-head,
    .kdn-view-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .kdn-list-grid {
        grid-template-columns: 1fr;
    }

    .kdn-write-actions a,
    .kdn-write-actions button {
        width: 100%;
    }
}
