* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0f0f10;
    color: #e7e7e7;
    font-family: Arial, 'Noto Sans KR', sans-serif;
}

a {
    color: inherit;
}

.topbar {
    min-height: 74px;
    background: linear-gradient(180deg, #1d1d1f, #151516);
    border-bottom: 3px solid #f47b20;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span {
    color: #f47b20;
}

.mainnav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mainnav a,
.usernav a {
    color: #e9e9e9;
    text-decoration: none;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.18s;
}

.mainnav a:hover,
.usernav a:hover {
    background: #2a2a2d;
    color: #f47b20;
}

.usernav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.usernav span {
    color: #aaa;
    font-size: 13px;
    margin: 0 4px;
}

.usernav .pay,
.btn {
    background: #f47b20;
    color: #111 !important;
    padding: 10px 16px;
    border-radius: 9px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.usernav .pay:hover,
.btn:hover {
    background: #ff943f;
    color: #111;
}

.layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    min-height: calc(100vh - 114px);
}

.sidebar {
    background: #171719;
    border-right: 1px solid #303033;
    padding: 20px;
    overflow: auto;
}

.sidebar h2 {
    color: #f47b20;
    margin: 0 0 16px;
    font-size: 20px;
}

.cat {
    background: #212124;
    border: 1px solid #333338;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
}

.cat h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 16px;
}

.cat small {
    display: block;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 8px;
}

.lesson-link {
    display: block;
    color: #ddd;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 14px;
}

.lesson-link:hover {
    background: #303034;
    color: #f47b20;
}

.content {
    padding: 34px;
    min-width: 0;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #f47b20;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.content h1 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    letter-spacing: -1px;
}

.board-card,
.card {
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.board-table {
    width: 100%;
    border-collapse: collapse;
}

.board-table th {
    background: #252529;
    color: #f47b20;
    font-size: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #38383d;
}

.board-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #2e2e33;
}

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

.board-table tr:hover td {
    background: #222226;
}

.col-title {
    text-align: left;
}

.col-date {
    width: 160px;
    text-align: center;
}

.post-title a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: 700;
}

.post-title a:hover {
    color: #f47b20;
}

.date {
    color: #aaa;
    text-align: center;
    font-size: 13px;
}

.empty {
    text-align: center;
    color: #999;
    padding: 50px 20px !important;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card {
    padding: 20px;
}

.card h2,
.card h3 {
    color: #f47b20;
    margin-top: 0;
}

.player {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
}

.form {
    max-width: 620px;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 13px 14px;
    margin: 8px 0 15px;
    background: #202024;
    border: 1px solid #44444a;
    color: #eee;
    border-radius: 10px;
    outline: none;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: #f47b20;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #202020;
}

th,
td {
    border: 1px solid #333;
    padding: 10px;
    text-align: left;
}

th {
    background: #2b2b2b;
    color: #f47b20;
}

.admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-menu a {
    display: inline-block;
    padding: 13px 16px;
    background: #242428;
    border: 1px solid #36363c;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
}

.admin-menu a:hover {
    background: #f47b20;
    color: #111;
}

.danger {
    background: #8b1a1a !important;
    color: #fff !important;
}

.footer {
    padding: 20px;
    text-align: center;
    background: #151515;
    color: #777;
    border-top: 1px solid #272727;
}

.comment {
    border-top: 1px solid #333;
    padding: 12px 0;
}

.notice {
    background: #2b2118;
    border: 1px solid #f47b20;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid #303033;
    }

    .topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 14px;
    }

    .mainnav {
        justify-content: flex-start;
        order: 3;
        width: 100%;
    }

    .usernav {
        margin-left: auto;
    }

    .content {
        padding: 22px;
    }

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

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .col-date {
        width: 110px;
    }
}
.edit-page {
    display: flex;
    justify-content: center;
}

.edit-wrap {
    width: 100%;
    max-width: 1050px;
}

.edit-form {
    max-width: none;
}

.form-card {
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.form-card label {
    display: block;
    color: #f47b20;
    font-weight: 800;
    font-size: 14px;
    margin: 16px 0 8px;
}

.form-card label:first-child {
    margin-top: 0;
}

.help-text {
    margin: -2px 0 8px;
    color: #999;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn.secondary {
    background: #2b2b30;
    color: #eee !important;
}

.btn.secondary:hover {
    background: #3a3a40;
    color: #f47b20 !important;
}

.ck-editor {
    color: #111;
}

.ck-editor__editable {
    min-height: 420px;
    background: #fff;
    color: #111;
    border-radius: 0 0 10px 10px !important;
}

.ck-toolbar {
    border-radius: 10px 10px 0 0 !important;
}

@media (max-width: 900px) {
    .edit-page {
        display: block;
    }

    .form-card {
        padding: 20px;
    }

    .ck-editor__editable {
        min-height: 300px;
    }
}
/* 게시글 보기 페이지 디자인 개선 */
.post-page {
    display: flex;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(244, 123, 32, 0.12), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.04), transparent 320px);
}

.post-wrap {
    width: 100%;
    max-width: 1040px;
}

.post-head {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #242428, #18181b 65%, #2a1d14);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 22px;
    padding: 34px 38px;
    margin-bottom: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.post-head::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 180px;
    height: 180px;
    background: rgba(244, 123, 32, 0.18);
    border-radius: 50%;
}

.post-head h1 {
    position: relative;
    margin: 0 0 18px;
    color: #fff;
    font-size: 34px;
    line-height: 1.35;
    letter-spacing: -1px;
    word-break: keep-all;
}

.post-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding-top: 16px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    background: #202024;
    border: 1px solid #38383d;
    color: #bbb;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.post-body {
    background: #1b1b1f;
    border: 1px solid #35353b;
    border-radius: 22px;
    padding: 42px;
    min-height: 420px;
    color: #e9e9e9;
    line-height: 1.85;
    font-size: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.post-body::before {
    content: "CONTENT";
    display: block;
    width: fit-content;
    margin-bottom: 22px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(244, 123, 32, 0.12);
    border: 1px solid rgba(244, 123, 32, 0.45);
    color: #f47b20;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.post-body p {
    margin: 0 0 18px;
}

.post-body h1,
.post-body h2,
.post-body h3 {
    color: #f47b20;
    margin-top: 26px;
}

.post-body a {
    color: #ff9a44;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body blockquote {
    margin: 22px 0;
    padding: 18px 22px;
    background: #242428;
    border-left: 4px solid #f47b20;
    border-radius: 12px;
    color: #ddd;
}

.post-body img,
.post-body video,
.post-body iframe {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #3a3a40;
    display: block;
    margin: 20px auto;
}

.file-box {
    background: linear-gradient(135deg, #19191c, #222226);
    border: 1px solid #37373d;
    border-radius: 18px;
    padding: 22px;
    margin-top: 20px;
}

.file-box h3 {
    margin: 0 0 14px;
    color: #f47b20;
    font-size: 17px;
}

.file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #252529;
    border: 1px solid #3b3b42;
    color: #eee;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 12px;
    margin-top: 9px;
    transition: 0.18s;
}

.file-link::before {
    content: "⬇";
    color: #f47b20;
    font-weight: 900;
}

.file-link:hover {
    background: #303036;
    color: #f47b20;
    transform: translateY(-1px);
}

.post-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #303033;
}

@media (max-width: 900px) {
    .post-head {
        padding: 26px 22px;
    }

    .post-head h1 {
        font-size: 25px;
    }

    .post-body {
        padding: 26px 22px;
        min-height: 300px;
    }
}
/* 관리자 관리 페이지 공통 디자인 */
.admin-dashboard,
.admin-page {
    background:
        radial-gradient(circle at top right, rgba(244, 123, 32, 0.12), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 320px);
}

.admin-page .page-head,
.admin-dashboard .page-head {
    background: linear-gradient(135deg, #242428, #18181b 65%, #2a1d14);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 22px;
    padding: 28px 32px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.admin-page h1,
.admin-dashboard h1 {
    color: #fff;
    font-size: 30px;
    margin: 0;
}

.admin-desc {
    color: #aaa;
    margin-top: 10px;
    line-height: 1.6;
}

.admin-card {
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
    margin-bottom: 22px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
    background: #1d1d21;
}

.admin-table th {
    background: #29292e;
    color: #f47b20;
    padding: 15px 16px;
    font-size: 14px;
    border: 0;
    border-bottom: 1px solid #3b3b42;
}

.admin-table td {
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #303036;
    color: #e5e5e5;
}

.admin-table tr:hover td {
    background: #242429;
}

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

.admin-table a {
    color: #ff9a44;
    text-decoration: none;
    font-weight: 700;
}

.admin-table a:hover {
    text-decoration: underline;
}

.admin-form {
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 22px;
}

.admin-form label {
    display: block;
    margin: 14px 0 7px;
    color: #f47b20;
    font-weight: 800;
    font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 13px 14px;
    background: #202024;
    border: 1px solid #44444a;
    color: #eee;
    border-radius: 10px;
    outline: none;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #f47b20;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #29292e;
    border: 1px solid #3c3c44;
    color: #ddd;
    font-size: 12px;
    font-weight: 800;
}

.badge.orange {
    background: rgba(244,123,32,0.14);
    border-color: rgba(244,123,32,0.45);
    color: #f47b20;
}

.badge.green {
    background: rgba(44,180,90,0.14);
    border-color: rgba(44,180,90,0.45);
    color: #74e399;
}

.badge.red {
    background: rgba(210,60,60,0.14);
    border-color: rgba(210,60,60,0.45);
    color: #ff7777;
}

@media (max-width: 900px) {
    .admin-card {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 760px;
    }

    .admin-page .page-head,
    .admin-dashboard .page-head {
        padding: 22px;
    }
}
.form-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.6fr;
    gap: 14px;
}

.table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.table-head h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.mono {
    font-family: Consolas, Monaco, monospace;
    color: #bbb !important;
    font-size: 13px;
}

.row-actions {
    white-space: nowrap;
}

.row-actions a {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 8px;
    background: #29292e;
    border: 1px solid #3c3c44;
    margin-right: 4px;
}

.row-actions a:hover {
    background: #f47b20;
    color: #111;
    text-decoration: none;
}

.row-actions .delete-link:hover {
    background: #8b1a1a;
    color: #fff;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
.payment-table th:nth-child(6),
.payment-table td:nth-child(6) {
    min-width: 420px;
}

.sub-text {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.inline-admin-form {
    display: grid;
    grid-template-columns: 120px 1fr 70px;
    gap: 8px;
    align-items: center;
}

.inline-admin-form select,
.inline-admin-form input {
    width: 100%;
    padding: 10px 11px;
    background: #202024;
    border: 1px solid #44444a;
    color: #eee;
    border-radius: 9px;
    outline: none;
}

.inline-admin-form select:focus,
.inline-admin-form input:focus {
    border-color: #f47b20;
}

.inline-admin-form .btn {
    padding: 10px 12px;
    height: 40px;
}

@media (max-width: 900px) {
    .inline-admin-form {
        grid-template-columns: 1fr;
    }

    .payment-table th:nth-child(6),
    .payment-table td:nth-child(6) {
        min-width: 280px;
    }
}
.user-table th:nth-child(6),
.user-table td:nth-child(6) {
    min-width: 330px;
}

.user-inline-form {
    grid-template-columns: 110px 110px 70px;
}

@media (max-width: 900px) {
    .user-inline-form {
        grid-template-columns: 1fr;
    }

    .user-table th:nth-child(6),
    .user-table td:nth-child(6) {
        min-width: 260px;
    }
}
.board-table .col-date {
    width: 130px;
    text-align: center;
}

.board-table .col-writer {
    width: 130px;
    text-align: center;
}

.board-table .col-file {
    width: 130px;
    text-align: center;
}

.board-table .date,
.board-table .writer,
.board-table .file-info {
    text-align: center;
    color: #aaa;
    font-size: 13px;
}

.board-table .no-file {
    color: #666;
    font-size: 12px;
}

@media (max-width: 900px) {
    .board-card {
        overflow-x: auto;
    }

    .board-table {
        min-width: 720px;
    }
}
.home-page {
    background:
        radial-gradient(circle at top right, rgba(244, 123, 32, 0.13), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.04), transparent 320px);
}

.home-hero {
    background: linear-gradient(135deg, #252529, #17171a 65%, #2b1d13);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 24px;
    padding: 34px 38px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.home-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 34px;
    letter-spacing: -1px;
}

.home-hero p:last-child {
    margin: 0;
    color: #aaa;
    line-height: 1.6;
}

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

.home-card {
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 22px;
    padding: 24px;
    min-height: 260px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.home-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #303036;
}

.home-card h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.mini-more {
    background: rgba(244, 123, 32, 0.12);
    border: 1px solid rgba(244, 123, 32, 0.42);
    color: #f47b20;
    text-decoration: none;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.mini-more:hover {
    background: #f47b20;
    color: #111;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    background: #242428;
    border: 1px solid #35353b;
    border-radius: 13px;
    text-decoration: none;
    transition: 0.18s;
}

.recent-item:hover {
    background: #2d2d33;
    border-color: rgba(244, 123, 32, 0.55);
    transform: translateY(-1px);
}

.recent-title {
    color: #eee;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.recent-date {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

.comment-card {
    background: linear-gradient(135deg, #1c1c1f, #211b17);
}

.recent-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-comment {
    background: #242428;
    border: 1px solid #38383e;
    border-radius: 15px;
    padding: 15px;
}

.comment-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-top strong {
    color: #fff;
}

.stars {
    color: #f47b20;
    letter-spacing: 1px;
    white-space: nowrap;
}

.home-comment small {
    display: block;
    color: #999;
    margin-bottom: 8px;
}

.home-comment p {
    margin: 0;
    color: #ddd;
    line-height: 1.6;
    font-size: 14px;
}

.empty-mini {
    color: #888;
    text-align: center;
    padding: 32px 10px;
    background: #242428;
    border: 1px dashed #3a3a40;
    border-radius: 14px;
}

@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        padding: 26px 22px;
    }

    .home-hero h1 {
        font-size: 26px;
    }

    .recent-item {
        flex-direction: column;
        gap: 5px;
    }
}
.upload-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 360px;
    z-index: 9999;
    display: none;
}

.upload-floating.show {
    display: block;
}

.upload-box {
    background: linear-gradient(135deg, #222226, #171719);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.upload-title {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
}

.upload-desc {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 16px;
}

.upload-progress {
    width: 100%;
    height: 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 999px;
    overflow: hidden;
}

.upload-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f47b20, #ffb066);
    transition: width 0.2s;
}

.upload-percent {
    color: #f47b20;
    font-size: 22px;
    font-weight: 900;
    margin-top: 12px;
}

.upload-warn {
    margin-top: 10px;
    color: #888;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .bank-popup {
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: auto;
    }
}
.lesson-page {
    background:
        radial-gradient(circle at top right, rgba(244, 123, 32, 0.12), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 320px);
}

.lesson-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    background: linear-gradient(135deg, #242428, #18181b 65%, #2a1d14);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 22px;
    padding: 30px 34px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.lesson-head h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 32px;
}

.lesson-head p:last-child {
    color: #aaa;
    line-height: 1.7;
    margin: 0;
}

.lesson-player-card {
    background: #111;
    border: 1px solid #34343a;
    border-radius: 22px;
    padding: 14px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

/* YouTube lesson player size fix */
.youtube-player-card {
    padding: 0;
    overflow: hidden;
    background: #000;
}

.youtube-player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 420px;
    border: 0;
    border-radius: 18px;
    background: #000;
}

@media (max-width: 900px) {
    .youtube-player {
        min-height: 260px;
    }
}

@media (max-width: 520px) {
    .youtube-player {
        min-height: 210px;
    }
}

.lesson-comment-card {
    margin-top: 22px;
}

.comment-form {
    background: #18181b;
    border: 1px solid #33333a;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
}

.comment-form label {
    display: block;
    color: #f47b20;
    font-weight: 800;
    margin: 12px 0 7px;
}

.comment-form select,
.comment-form textarea {
    width: 100%;
    padding: 12px 13px;
    background: #202024;
    border: 1px solid #44444a;
    color: #eee;
    border-radius: 10px;
    margin-bottom: 12px;
}

.comment-form textarea {
    min-height: 110px;
    resize: vertical;
}

@media (max-width: 900px) {
    .lesson-head {
        flex-direction: column;
        padding: 24px;
    }

    .lesson-head h1 {
        font-size: 25px;
    }
}
.lesson-link.active {
    background: #f47b20;
    color: #111;
    font-weight: 900;
}

.lesson-link.active:hover {
    color: #111;
}

.free-label {
    display: inline-flex;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(44, 180, 90, 0.16);
    color: #74e399;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.lesson-link.active .free-label {
    background: #111;
    color: #74e399;
}
.user-table {
    min-width: 1100px;
}

.user-table th:nth-child(9),
.user-table td:nth-child(9) {
    min-width: 330px;
}
.pay-page {
    background:
        radial-gradient(circle at top right, rgba(244, 123, 32, 0.14), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 320px);
}

.pay-hero {
    background: linear-gradient(135deg, #252529, #17171a 65%, #2b1d13);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 24px;
    padding: 34px 38px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.pay-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 34px;
}

.pay-hero p:last-child {
    color: #aaa;
    margin: 0;
}

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

.pay-card {
    position: relative;
    overflow: hidden;
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.32);
}

.pay-card::before {
    content: "";
    position: absolute;
    right: -55px;
    top: -55px;
    width: 140px;
    height: 140px;
    background: rgba(244,123,32,0.13);
    border-radius: 50%;
}

.pay-card-head {
    position: relative;
    margin-bottom: 22px;
}

.pay-card h2 {
    color: #fff;
    margin: 14px 0 0;
    font-size: 23px;
}

.price {
    position: relative;
    color: #f47b20;
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 20px;
}

.price span {
    color: #aaa;
    font-size: 16px;
    margin-left: 4px;
}

.pay-list {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.pay-list li {
    color: #ccc;
    padding: 10px 0 10px 24px;
    border-bottom: 1px solid #303036;
    position: relative;
    font-size: 14px;
}

.pay-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #f47b20;
    font-weight: 900;
}

.pay-btn {
    width: 100%;
}

@media (max-width: 1000px) {
    .pay-grid {
        grid-template-columns: 1fr;
    }

    .pay-hero {
        padding: 26px 22px;
    }

    .pay-hero h1 {
        font-size: 26px;
    }
}
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(244,123,32,0.14), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 320px);
}

.login-wrap {
    width: 100%;
    max-width: 520px;
}

.login-card {
    background: linear-gradient(135deg, #202024, #171719 70%, #2a1d14);
    border: 1px solid #34343a;
    border-top: 3px solid #f47b20;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.45);
}

.login-head {
    margin-bottom: 24px;
}

.login-head h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 34px;
}

.login-head p:last-child {
    margin: 0;
    color: #aaa;
    line-height: 1.6;
}

.login-form {
    max-width: none;
}

.login-form label {
    display: block;
    color: #f47b20;
    font-weight: 800;
    margin: 14px 0 8px;
}

.login-btn {
    width: 100%;
    margin-top: 10px;
}

.login-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #999;
    font-size: 14px;
}

.login-links a {
    color: #f47b20;
    font-weight: 800;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}
.register-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(244,123,32,0.14), transparent 360px),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 320px);
}

.register-wrap {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

.register-card {
    background: linear-gradient(135deg, #202024, #171719 70%, #2a1d14);
    border: 1px solid #34343a;
    border-top: 3px solid #f47b20;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.45);
}

.register-head {
    margin-bottom: 24px;
}

.register-head h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 34px;
}

.register-head p:last-child {
    margin: 0;
    color: #aaa;
    line-height: 1.6;
}

.register-form {
    max-width: none;
}

.register-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.register-form label {
    display: block;
    color: #f47b20;
    font-weight: 800;
    margin: 0 0 8px;
}

.register-btn {
    width: 100%;
    margin-top: 22px;
}

.register-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #999;
    font-size: 14px;
}

.register-links a {
    color: #f47b20;
    font-weight: 800;
    text-decoration: none;
}

.register-links a:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-card {
        padding: 26px 22px;
    }

    .register-head h1 {
        font-size: 28px;
    }
}
.register-form input {
    height: 52px;
    font-size: 15px;
    padding: 0 16px;
    background: #1d1d20;
    border: 1px solid #3a3a40;
    border-radius: 12px;
    color: #fff;
    transition: all .2s;
}

.register-form input:focus {
    border-color: #f47b20;
    box-shadow: 0 0 0 3px rgba(244,123,32,.15);
    outline: none;
}
.check-msg {
    margin: -6px 0 10px;
    font-size: 13px;
    min-height: 18px;
}

.check-msg.good {
    color: #74e399;
}

.check-msg.bad {
    color: #ff7777;
}
.board-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: #1c1c1f;
    border: 1px solid #34343a;
    border-radius: 16px;
    padding: 14px;
}

.board-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    background: #202024;
    border: 1px solid #44444a;
    color: #eee;
    border-radius: 10px;
    outline: none;
}

.board-search input:focus {
    border-color: #f47b20;
}

.board-summary {
    color: #aaa;
    font-size: 14px;
    margin: 0 0 14px;
}

.board-summary strong {
    color: #f47b20;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #242428;
    border: 1px solid #36363c;
    border-radius: 10px;
    color: #eee;
    text-decoration: none;
    font-weight: 800;
}

.pagination a:hover,
.pagination span.active {
    background: #f47b20;
    color: #111;
    border-color: #f47b20;
}

@media (max-width: 700px) {
    .board-search {
        flex-direction: column;
    }
}
.free-course,
.paid-course {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px !important;
    font-weight: 800;
    letter-spacing: .3px;
}

/* 무료 */
.free-course {
    background: rgba(46, 204, 113, .15);
    color: #2ecc71 !important;
    border: 1px solid rgba(46, 204, 113, .25);
}

/* 유료 */
.paid-course {
    background: rgba(244, 123, 32, .15);
    color: #f47b20 !important;
    border: 1px solid rgba(244, 123, 32, .25);
}
.bank-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    padding: 20px;
}

.bank-popup.show {
    display: flex;
}

.bank-box {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: linear-gradient(135deg, #222226, #171719 70%, #2a1d14);
    border: 1px solid #3a3a40;
    border-top: 3px solid #f47b20;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.bank-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #303036;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.bank-box h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 24px;
}

.bank-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #33333a;
}

.bank-row span,
.bank-info span {
    color: #999;
    font-size: 13px;
}

.bank-row strong {
    color: #f47b20;
}

.bank-info {
    background: #1b1b1f;
    border: 1px solid #34343a;
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
}

.bank-info div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.bank-info strong {
    color: #fff;
}

.bank-help {
    color: #aaa;
    line-height: 1.6;
    font-size: 13px;
    margin: 16px 0;
}

@media (max-width: 600px) {
    .bank-popup {
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: auto;
    }
}
.payment-table {
    min-width: 1400px;
}

/* Subject accordion / lesson list paging */
.cat-collapsible {
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding-bottom: 10px;
}

.cat-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.cat-toggle-icon {
    display: inline-flex;
    width: 18px;
    justify-content: center;
    transition: transform .18s ease;
    color: #f47b20;
}

.cat-collapsible.is-open .cat-toggle-icon {
    transform: rotate(90deg);
}

.cat-toggle-title {
    flex: 1;
    min-width: 0;
    font-weight: 800;
}

.cat-status-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    max-width: 130px;
}

.cat-panel {
    display: none;
    padding-top: 6px;
}

.cat-collapsible.is-open .cat-panel {
    display: block;
}

.lesson-link.hidden {
    display: none !important;
}

.lesson-more-btn {
    width: 100%;
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(244,123,32,.35);
    background: rgba(244,123,32,.08);
    color: #f47b20;
    font-weight: 800;
    cursor: pointer;
}

.lesson-more-btn:hover {
    background: rgba(244,123,32,.16);
}

/* Admin season status layout fix */
.season-status-card .season-status-head,
.table-head.season-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.season-status-card .season-status-actions,
.admin-actions.season-status-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.season-status-card .season-status-actions form {
    margin: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table .row-actions {
    min-width: 160px;
    white-space: normal;
}

.admin-table .row-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 3px;
}

/* Lesson plan / scheduled public display patch */
.cat {
    padding: 16px 18px;
}

.cat-toggle {
    align-items: flex-start;
    gap: 10px;
    min-height: 42px;
}

.cat-toggle-title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    word-break: keep-all;
}

.cat-status-wrap {
    flex: 0 0 auto;
    max-width: 115px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.cat-status-wrap small {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    white-space: nowrap;
}

.lesson-link.lesson-ready {
    color: #f2f2f2;
}

.lesson-link.lesson-pending,
.lesson-link.disabled {
    color: #8b8b91;
    cursor: help;
    opacity: .86;
}

.lesson-link.lesson-pending:hover {
    background: #242428;
    color: #aaa;
}

.lesson-link.lesson-pending span {
    color: #b9b9be;
}

.lesson-plan-card .lesson-plan-form {
    margin-top: 14px;
}

.lesson-plan-table input {
    width: 100%;
    min-width: 220px;
}

.admin-table td,
.admin-table th {
    vertical-align: middle;
}

.admin-table .row-actions {
    min-width: 190px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.admin-table .row-actions a {
    margin: 0;
    min-width: 54px;
}

@media (max-width: 760px) {
    .cat-toggle {
        flex-wrap: wrap;
    }
    .cat-status-wrap {
        width: 100%;
        max-width: none;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        padding-left: 28px;
    }
}


/* Paid price hide + sidebar width refinement */
.layout {
    grid-template-columns: 340px minmax(0, 1fr);
}

.sidebar {
    padding: 20px 14px 20px 16px;
}

.cat {
    padding: 16px 18px;
}

.cat-toggle {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.cat-toggle-title {
    min-width: 0;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: normal;
}

.cat-status-wrap {
    max-width: 112px;
    align-items: flex-end;
}

.lesson-link {
    word-break: keep-all;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 310px minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .cat-toggle {
        grid-template-columns: 18px minmax(0, 1fr);
    }
    .cat-status-wrap {
        grid-column: 2 / -1;
        max-width: none;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
}


/* Purchased subject / admin table refinements */
.cat.cat-purchased {
    position: relative;
    border-color: rgba(31, 184, 106, .55);
    background: linear-gradient(180deg, rgba(31,184,106,.16), rgba(28,28,31,.98));
    box-shadow: 0 0 0 1px rgba(31,184,106,.12) inset;
}

.cat.cat-purchased .cat-toggle {
    padding-top: 26px;
}

.purchased-corner-label {
    position: absolute;
    top: 12px;
    left: 18px;
    color: #6dffae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: -.2px;
    background: rgba(8, 70, 43, .92);
    border: 1px solid rgba(45, 214, 125, .38);
    border-radius: 999px;
    padding: 4px 9px;
    line-height: 1;
}

.cat.cat-purchased .cat-status-wrap .free-course {
    background: rgba(24, 160, 88, .32);
    color: #73ffb2;
    border-color: rgba(64, 224, 135, .36);
}

.payment-table-wrap,
.lesson-admin-table-wrap,
.table-responsive {
    overflow-x: auto;
}

.payment-table {
    min-width: 1560px;
    table-layout: auto;
}

.payment-table th,
.payment-table td {
    white-space: nowrap;
}

.payment-table .payment-season-col,
.payment-table .payment-season-cell {
    min-width: 150px;
    width: 150px;
    white-space: normal;
    line-height: 1.45;
}

.payment-table .payment-amount-cell {
    min-width: 110px;
}

.payment-table .payment-manage-cell {
    min-width: 360px;
}

.payment-table .inline-admin-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.payment-table .inline-admin-form input[name="admin_memo"] {
    min-width: 160px;
}

.season-status-card {
    overflow: visible;
}

.season-status-card .season-status-head,
.table-head.season-status-head {
    align-items: flex-start;
}

.season-status-card .season-status-actions,
.admin-actions.season-status-actions {
    width: 100%;
    justify-content: flex-start;
}

.season-status-card .season-status-actions .btn,
.admin-actions.season-status-actions .btn {
    min-width: 104px;
    white-space: nowrap;
}

.admin-collapse {
    padding: 0;
    overflow: hidden;
}

.admin-collapse > summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 20px;
    margin: 0;
    user-select: none;
}

.admin-collapse > summary::-webkit-details-marker {
    display: none;
}

.admin-collapse > summary::before {
    content: '▸';
    color: #f47b20;
    font-size: 13px;
    margin-right: 8px;
    transform: rotate(0deg);
    transition: transform .18s ease;
}

.admin-collapse[open] > summary::before {
    transform: rotate(90deg);
}

.admin-collapse > .help-text,
.admin-collapse > form {
    margin-left: 20px;
    margin-right: 20px;
}

.admin-collapse > form {
    padding-bottom: 20px;
}

.lesson-plan-summary {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.lesson-plan-card .table-responsive {
    margin-top: 12px;
}


/* Purchased / not purchased season-only sidebar patch */
.cat.cat-purchased,
.cat.cat-not-purchased {
    position: relative;
    padding-top: 28px;
}

.cat.cat-purchased {
    border-color: rgba(31, 184, 106, .58) !important;
    background: linear-gradient(180deg, rgba(31,184,106,.15), rgba(28,28,31,.98)) !important;
    box-shadow: 0 0 0 1px rgba(31,184,106,.12) inset;
}

.cat.cat-not-purchased {
    border-color: rgba(226, 66, 66, .68) !important;
    background: linear-gradient(180deg, rgba(226,66,66,.14), rgba(28,28,31,.98)) !important;
    box-shadow: 0 0 0 1px rgba(226,66,66,.12) inset;
}

.subject-access-label {
    position: absolute;
    top: 11px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.2px;
    white-space: nowrap;
}

.subject-access-owned {
    color: #6dffae;
    background: rgba(8, 70, 43, .92);
    border: 1px solid rgba(45, 214, 125, .38);
}

.subject-access-missing {
    color: #ffb0b0;
    background: rgba(105, 24, 24, .92);
    border: 1px solid rgba(255, 93, 93, .42);
}

.cat.cat-not-purchased .cat-status-wrap .paid-course {
    color: #ff8b8b !important;
    background: rgba(226,66,66,.22) !important;
    border-color: rgba(255,93,93,.4) !important;
}

.cat.cat-purchased .cat-status-wrap .free-course {
    color: #73ffb2 !important;
    background: rgba(24, 160, 88, .32) !important;
    border-color: rgba(64, 224, 135, .36) !important;
}

/* old label class kept for compatibility but hidden if a cached fragment remains */
.purchased-corner-label { display: none !important; }

/* 자동화 관리 */
.admin-automation-page .admin-auto-card {
    background: rgba(20, 20, 22, .96);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
}
.admin-automation-page .auto-settings-form {
    display: grid;
    gap: 10px;
}
.admin-automation-page .auto-settings-form input[type="text"],
.admin-automation-page .auto-settings-form input[type="number"],
.admin-automation-page .auto-settings-form textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    background: #0f0f10;
    color: #fff;
    border-radius: 12px;
    padding: 11px 12px;
}
.admin-automation-page .check-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-automation-page .form-help {
    margin: 0 0 8px;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}
.auto-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.auto-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}
.auto-stat-grid > div {
    background: #101113;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 14px;
}
.auto-stat-grid b {
    display: block;
    color: #ff9f43;
    font-size: 20px;
}
.auto-stat-grid span {
    color: rgba(255,255,255,.66);
    font-size: 13px;
}
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.admin-table.compact {
    min-width: 900px;
}
.admin-table .comment-cell {
    max-width: 320px;
    white-space: normal;
    line-height: 1.45;
}
.row-actions form {
    display: inline-block;
    margin: 2px;
}
.row-actions button {
    border: 0;
    border-radius: 10px;
    padding: 7px 10px;
    background: #2b2d31;
    color: #fff;
    cursor: pointer;
}
.row-actions button.danger {
    background: #9c2d2d;
}
.auto-comment-mark {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,159,67,.14);
    color: #ffb86c;
    font-size: 11px;
    font-style: normal;
}
@media (max-width: 780px) {
    .auto-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================
   메인페이지 배너/최근글 다크 테마 복구 패치
   - 배너 유지
   - 최근글 배경은 사이트 다크 배경과 통일
   - 게시판명 주황색, 컬럼/게시글 흰색
   ========================================================== */
.ad-banner-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}
.ad-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 148px;
    padding: 18px;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #111827;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
    isolation: isolate;
    transition: transform .18s ease, box-shadow .18s ease;
}
.ad-banner::before {
    content: '';
    position: absolute;
    inset: -50% -20% auto auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    filter: blur(2px);
    z-index: -1;
}
.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .34);
}
.ad-kicker {
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .08em;
    font-weight: 900;
    background: rgba(255,255,255,.18);
}
.ad-banner strong {
    margin-top: 14px;
    font-size: 23px;
    line-height: 1.1;
    font-weight: 950;
}
.ad-banner em {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    font-style: normal;
    color: rgba(255,255,255,.88);
}
.ad-cta {
    margin-top: auto;
    width: max-content;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(255,255,255,.18);
}
.ad-banner-core { background: linear-gradient(135deg, #111827, #7c2d12); }
.ad-banner-ont { background: linear-gradient(135deg, #0f172a, #1d4ed8); }
.ad-banner-dash { background: linear-gradient(135deg, #111827, #047857); }

.index-board-grid {
    align-items: stretch;
    gap: 16px;
}
.index-board-card,
.index-comments-card {
    border: 1px solid #34343a !important;
    background: #1c1c1f !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
    min-width: 0;
    overflow: hidden;
}
.index-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #34343a !important;
}
.index-board-kicker {
    display: block;
    margin-bottom: 4px;
    color: #f47b20 !important;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .12em;
}
.index-board-head h2 {
    margin: 0;
    color: #f47b20 !important;
    font-size: 19px;
    letter-spacing: -.03em;
}
.board-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f47b20 !important;
    color: #111 !important;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}
.board-more-link:hover { background: #ff943f !important; }
.index-board-table-wrap {
    width: 100%;
    overflow: hidden;
    border: 1px solid #34343a !important;
    border-radius: 14px;
    background: #171719 !important;
}
.index-board-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}
.index-board-table .col-date { width: 92px; }
.index-board-table .col-writer { width: 82px; }
.index-board-table th {
    padding: 10px 9px;
    border-bottom: 1px solid #38383d !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 900;
    text-align: left;
    background: #252529 !important;
    white-space: nowrap;
}
.index-board-table td {
    padding: 11px 9px;
    border-bottom: 1px solid #2e2e33 !important;
    color: #fff !important;
    background: transparent !important;
    vertical-align: middle;
}
.index-board-table tbody tr:hover td { background: #222226 !important; }
.index-board-table tbody tr:last-child td { border-bottom: 0 !important; }
.index-board-table .board-date,
.index-board-table .board-writer {
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.index-board-table .board-title a {
    display: block;
    color: #fff !important;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.index-board-table .board-title a:hover { color: #f47b20 !important; }
.empty-board-row {
    color: #bdbdbd !important;
    text-align: center;
    padding: 22px 8px !important;
}
.index-board-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
    font-size: 12px;
    color: #ddd !important;
}
.index-board-pager a,
.index-board-pager .disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid #3a3a40 !important;
    text-decoration: none;
    font-weight: 900;
}
.index-board-pager a { color: #111 !important; background: #f47b20 !important; }
.index-board-pager a:hover { color: #111 !important; background: #ff943f !important; border-color: #ff943f !important; }
.index-board-pager .disabled { color: #777 !important; background: #202024 !important; }
.index-board-pager strong { color: #fff !important; }
.index-comment-list { display: grid; gap: 10px; }
.index-comment-item {
    padding: 12px;
    border: 1px solid #34343a !important;
    border-radius: 14px;
    background: #171719 !important;
}
.index-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
}
.index-comment-meta span { color: #f59e0b !important; letter-spacing: -1px; }
.index-comment-item small {
    display: block;
    margin-top: 3px;
    color: #ddd !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.index-comment-item p {
    margin: 8px 0 0;
    color: #fff !important;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 자동화 관리 페이지가 좌측 메뉴가 아닌 메인 콘텐츠 영역에 정렬되도록 보정 */
.admin-automation-page {
    width: 100%;
    max-width: 1280px;
}
.admin-automation-page h1 {
    margin-bottom: 8px;
}
.admin-automation-page .admin-desc {
    color: rgba(255,255,255,.68);
    margin-bottom: 18px;
}
@media (max-width: 980px) {
    .ad-banner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .index-board-table .col-date { width: 78px; }
    .index-board-table .col-writer { width: 62px; }
    .index-board-table th,
    .index-board-table td { padding: 8px 6px; font-size: 12px; }
    .ad-banner { min-height: 128px; }
}

/* ==========================================================
   자동화 관리 - 강의별 코멘트 풀 / 사용 상태 표시
   ========================================================== */
.admin-automation-page .auto-settings-inline {
    grid-template-columns: auto 110px 1fr auto;
    align-items: end;
}
.admin-automation-page .auto-settings-inline .check-row {
    align-self: center;
    margin-bottom: 9px;
}
.auto-pool-stat {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}
.auto-lesson-pool-list {
    display: grid;
    gap: 14px;
}
.auto-lesson-pool {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(8,8,10,.56);
    border-radius: 16px;
    overflow: hidden;
}
.auto-lesson-pool summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-weight: 800;
    background: rgba(255,255,255,.035);
}
.auto-lesson-pool summary::-webkit-details-marker { display: none; }
.auto-lesson-pool summary::before {
    content: '▶';
    color: #ff9f43;
    margin-right: 8px;
    transition: transform .18s ease;
}
.auto-lesson-pool[open] summary::before { content: '▼'; }
.auto-lesson-pool summary span { flex: 1; }
.auto-lesson-pool summary em {
    font-style: normal;
    color: #ffb86c;
    font-size: 12px;
    border: 1px solid rgba(255,159,67,.28);
    border-radius: 999px;
    padding: 4px 9px;
    white-space: nowrap;
}
.auto-pool-body {
    padding: 16px;
}
.auto-pool-add-form {
    display: grid;
    grid-template-columns: minmax(130px, 180px) 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
}
.auto-pool-bulk-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
    align-items: start;
}
.auto-pool-add-form input,
.auto-pool-bulk-form textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    background: #0f0f10;
    color: #fff;
    border-radius: 12px;
    padding: 11px 12px;
}
.auto-pool-table-wrap { margin-top: 8px; }
.auto-pool-table th:nth-child(4),
.auto-pool-table td:nth-child(4) { min-width: 280px; }
.auto-status-pill,
.auto-used-mark,
.auto-ready-mark {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.auto-status-pill.ready,
.auto-ready-mark {
    background: rgba(35, 197, 103, .16);
    color: #5ff59c;
    border: 1px solid rgba(35, 197, 103, .28);
}
.auto-status-pill.used,
.auto-used-mark {
    background: rgba(255, 159, 67, .14);
    color: #ffb86c;
    border: 1px solid rgba(255,159,67,.28);
}
.auto-status-pill.inactive {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.14);
}
.pool-status-used td { opacity: .78; }
.pool-status-inactive td { opacity: .72; }
@media (max-width: 1100px) {
    .auto-pool-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-automation-page .auto-settings-inline { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .auto-pool-add-form,
    .auto-pool-bulk-form { grid-template-columns: 1fr; }
    .auto-pool-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.trouble-cat-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}
.trouble-cat-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: #202024;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}
.trouble-cat-tabs a:hover,
.trouble-cat-tabs a.active {
    background: #f47b20;
    border-color: #f47b20;
    color: #111;
}
.check-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.check-line input { width: auto; }
.troubleshooting-page .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 12px;
}
.troubleshooting-page .badge.orange {
    background: rgba(244,123,32,.16);
    color: #f47b20;
}
