/*
=============================================================================
한국사 메인페이지
=============================================================================

자주 수정하는 위치

1. 메인 배경 파일
   index.php의 hero-background src

2. 메인 배너 높이
   .hero의 height

3. 스크롤 확대/축소 범위
   assets/js/app.js의 HERO_MAX_SCALE / HERO_MIN_SCALE

4. 색상
   아래 :root 변수
*/

:root {
    --navy: #071a31;
    --navy-2: #10243c;
    --navy-3: #172d47;
    --gold: #c9963d;
    --gold-light: #e0ba72;
    --cream: #f7f3eb;
    --paper: #fffdf8;
    --ink: #161a1e;
    --muted: #6f6a62;
    --line: #dfd5c7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Malgun Gothic", "Noto Sans KR", sans-serif;
    line-height: 1.6;
}

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

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.page-width {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
}

/* 상단 메뉴 */
.site-header {
    position: relative;
    z-index: 100;
    color: white;
    background: var(--navy);
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--gold-light);
    border: 1px solid var(--gold);
    border-radius: 50%;
    font-family: serif;
    font-size: 22px;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand strong {
    font-family: serif;
    font-size: 25px;
}

.brand small {
    margin-top: 5px;
    color: rgba(255,255,255,.58);
    font-size: 9px;
    letter-spacing: .08em;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    font-weight: 800;
}

.main-menu > a:hover {
    color: var(--gold-light);
}

.outline-button,
.gold-button {
    padding: 10px 18px;
    border-radius: 4px;
}

.outline-button {
    border: 1px solid rgba(255,255,255,.55);
}

.gold-button {
    color: #17120a;
    background: var(--gold);
}

.mobile-menu-button {
    display: none;
    color: white;
    background: transparent;
    border: 0;
    font-size: 27px;
}

/* 메인 배너 */
.hero {
    position: relative;
    height: 510px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    text-align: center;
    background: #d9c6a4;
}

/*
배경은 실제 img 태그입니다.
Hero 섹션과 함께 자연스럽게 스크롤됩니다.
JavaScript는 이 이미지의 scale만 변경합니다.
*/
.hero-background {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    transform-origin: center;
    will-change: transform;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(246, 224, 184, .14);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 40px));
}

.hero-small {
    margin: 0;
    font-family: serif;
    font-size: clamp(25px, 3vw, 40px);
}

.hero h1 {
    margin: 0;
    font-family: serif;
    font-size: clamp(78px, 9vw, 132px);
    line-height: 1;
    letter-spacing: -.08em;
}

.hero-description {
    margin: 22px auto;
    color: #2b2a27;
    font-size: 16px;
}

.hero-action {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    padding: 0 26px;
    color: white;
    background: var(--navy);
    border-radius: 4px;
    font-weight: 800;
}

/* 시대별 카드 */
.era-section {
    padding: 48px 0;
    background: var(--paper);
}

.era-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.era-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 18px;
    text-align: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 5px;
    transition: transform .2s ease, border-color .2s ease;
}

.era-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.era-card h2 {
    margin: 0;
    font-family: serif;
    font-size: 22px;
}

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

.era-card span {
    margin-top: auto;
    color: #9d6619;
    font-size: 13px;
    font-weight: 800;
}

/* 2x2 대시보드 */
.dashboard-section {
    padding: 60px 0 80px;
    color: white;
    background: #071522;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, .9fr);
    grid-template-rows: minmax(330px, auto) minmax(300px, auto);
    gap: 20px;
}

.panel {
    min-width: 0;
    padding: 28px;
    overflow: hidden;
    background: var(--navy-2);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px;
}

.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-heading span {
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.panel-heading h2 {
    margin: 2px 0 0;
    font-family: serif;
    font-size: 29px;
}

.panel-heading > a {
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 800;
}

/* 주요 역사 사건 */
.event-panel {
    position: relative;
    background:
        linear-gradient(90deg, rgba(6,22,38,.97), rgba(6,22,38,.76)),
        url("../images/hero/main-history.jpg") center/cover;
}

.event-slider {
    min-height: 190px;
    position: relative;
}

.event-slide {
    display: none;
    max-width: 650px;
}

.event-slide.active {
    display: block;
    animation: panelFade .35s ease;
}

.event-year {
    margin: 0 0 6px;
    color: var(--gold-light);
    font-size: 15px;
    font-weight: 800;
}

.event-slide h3 {
    margin: 0;
    font-family: serif;
    font-size: clamp(35px, 5vw, 58px);
}

.event-slide > p:not(.event-year) {
    max-width: 580px;
    color: rgba(255,255,255,.73);
}

.event-slide a {
    display: inline-flex;
    margin-top: 12px;
    color: var(--gold-light);
    font-weight: 800;
}

.slider-controls {
    display: flex;
    gap: 8px;
}

.slider-controls button {
    width: 38px;
    height: 38px;
    color: white;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    cursor: pointer;
}

.event-dots {
    display: flex;
    gap: 8px;
}

.event-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgba(255,255,255,.28);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.event-dots button.active {
    width: 24px;
    background: var(--gold);
    border-radius: 999px;
}

/* OX 퀴즈 */
.quiz-panel {
    display: flex;
    flex-direction: column;
}

.quiz-question {
    margin: 20px 0 25px;
    font-family: serif;
    font-size: 24px;
    line-height: 1.7;
}

.quiz-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quiz-actions button {
    min-height: 72px;
    color: white;
    background: var(--navy-3);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 6px;
    font-family: serif;
    font-size: 32px;
    font-weight: 900;
    cursor: pointer;
}

.quiz-actions button:hover {
    color: #17120a;
    background: var(--gold);
}

.quiz-result {
    min-height: 52px;
    margin: 18px 0 0;
    color: var(--gold-light);
    font-size: 13px;
}

/* 주요 미디어 */
.media-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.media-card {
    overflow: hidden;
    background: var(--navy-3);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    transition: transform .2s ease;
}

.media-card:hover {
    transform: translateY(-4px);
}

.media-card img {
    width: 100%;
    height: 145px;
    object-fit: contain;
    object-position: center;
     background: #122f50;
}

.media-card div {
    padding: 13px;
}

.media-card small {
    color: #82a7d2;
    font-size: 10px;
}

.media-card h3 {
    margin: 3px 0 0;
    font-family: serif;
    font-size: 18px;
}

/* 게시판 */
.board-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.board-tabs button {
    padding: 8px 11px;
    color: rgba(255,255,255,.62);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.board-tabs button.active {
    color: white;
    border-color: var(--gold);
}

.board-list {
    display: none;
}

.board-list.active {
    display: block;
}

.board-list a {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
}

.board-list a:hover span {
    color: var(--gold-light);
}

.board-list small {
    flex: none;
    color: rgba(255,255,255,.45);
}

.site-footer {
    padding: 30px 0;
    color: rgba(255,255,255,.55);
    background: #040e19;
    font-size: 12px;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 태블릿 */
@media (max-width: 1080px) {
    .era-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .media-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 모바일 */
@media (max-width: 760px) {
    .page-width {
        width: calc(100% - 28px);
    }

    .mobile-menu-button {
        display: block;
    }

    .main-menu {
        position: absolute;
        top: 82px;
        right: 14px;
        display: none;
        width: 230px;
        padding: 18px;
        flex-direction: column;
        align-items: stretch;
        background: var(--navy);
        box-shadow: 0 16px 34px rgba(0,0,0,.35);
    }

    .main-menu.open {
        display: flex;
    }

    .hero {
        height: 430px;
    }

    .hero h1 {
        font-size: 78px;
    }

    .hero-description {
        display: none;
    }

    .era-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .brand small {
        display: none;
    }

    .hero {
        height: 390px;
    }

    .hero h1 {
        font-size: 64px;
    }

    .hero-small {
        font-size: 20px;
    }

    .era-grid,
    .media-row {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 22px;
    }
}
.hero-search {
    width: min(680px, 100%);
    display: flex;
    margin: 24px auto 18px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(7, 26, 49, 0.2);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    color: #161a1e;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 16px;
}

.hero-search button {
    min-width: 95px;
    padding: 0 20px;
    color: white;
    background: #071a31;
    border: 0;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.hero-search button:hover {
    background: #12375d;
}

@media (max-width: 560px) {
    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        min-height: 44px;
    }
}
.search-page {
    min-height: 100vh;
    padding: 70px 0;
    background: #f7f3eb;
}

.search-page h1 {
    font-family: serif;
    font-size: 40px;
}

.search-result-card {
    display: block;
    margin-top: 14px;
    padding: 22px;
    background: white;
    border: 1px solid #dfd5c7;
    border-radius: 7px;
}

.search-result-card:hover {
    border-color: #c9963d;
}

.search-result-card small {
    color: #9d6619;
    font-weight: bold;
}

.search-result-card h2 {
    margin: 5px 0;
    font-family: serif;
}

.search-result-card p {
    color: #6f6a62;
}
/* =====================================================
   회원가입 페이지
===================================================== */

.signup-page {
    min-height: 100vh;
    margin: 0;
    color: #171a1e;
    background: #f6f1e8;
}

.signup-header {
    color: white;
    background: #071a31;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.signup-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.signup-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #dfbd7d;
    border: 1px solid #c99a4d;
    border-radius: 50%;
    font-family: serif;
    font-size: 21px;
}

.signup-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.signup-brand-text strong {
    font-family: serif;
    font-size: 23px;
}

.signup-brand-text small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    letter-spacing: 0.08em;
}

.signup-home-link {
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
}

.signup-main {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 55px 20px 80px;
}

.signup-card {
    padding: 42px 48px;
    background: #fffdf8;
    border: 1px solid #dfd5c7;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(43, 32, 18, 0.13);
}

.signup-heading {
    margin-bottom: 32px;
    text-align: center;
}

.signup-heading > p {
    margin: 0;
    color: #9b671d;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.18em;
}

.signup-heading h1 {
    margin: 4px 0 8px;
    color: #071a31;
    font-family: serif;
    font-size: 38px;
}

.signup-heading span {
    color: #706b64;
    font-size: 13px;
}

.signup-form {
    display: grid;
    gap: 22px;
}

.signup-field {
    display: grid;
    gap: 8px;
}

.signup-field label {
    color: #162235;
    font-size: 14px;
    font-weight: bold;
}

.signup-field label em {
    color: #b84436;
    font-style: normal;
}

.signup-field input {
    width: 100%;
    min-height: 49px;
    padding: 0 14px;
    color: #171a1e;
    background: white;
    border: 1px solid #d5cbbd;
    border-radius: 5px;
    outline: none;
    font-size: 15px;
}

.signup-field input:focus {
    border-color: #c9963d;
    box-shadow: 0 0 0 3px rgba(201, 150, 61, 0.17);
}

.signup-field small {
    color: #7a756e;
    font-size: 11px;
}

.signup-inline-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 9px;
}

.check-button {
    color: white;
    background: #263b55;
    border: 0;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.check-button:hover {
    background: #071a31;
}

.signup-password-field {
    position: relative;
}

.signup-password-field input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 51px;
    min-height: 34px;
    transform: translateY(-50%);
    color: #364354;
    background: #efebe4;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.password-rules span {
    padding: 4px 8px;
    color: #7a756e;
    background: #eee9e1;
    border-radius: 999px;
    font-size: 10px;
}

.password-rules span::before {
    content: "○";
    margin-right: 4px;
}

.password-rules span.passed {
    color: #267342;
    background: #e8f4eb;
}

.password-rules span.passed::before {
    content: "✓";
}

.field-success {
    color: #267342 !important;
}

.field-error {
    color: #b4362c !important;
}

.signup-agreement {
    display: grid;
    gap: 13px;
    margin-top: 4px;
    padding: 20px;
    background: #f7f3eb;
    border: 1px solid #ded4c6;
    border-radius: 6px;
}

.signup-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #5f5a54;
    font-size: 13px;
    cursor: pointer;
}

.signup-check input {
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

.signup-check em {
    color: #a2362c;
    font-style: normal;
    font-weight: bold;
}

.signup-check a {
    margin-left: 5px;
    color: #875615;
    font-weight: bold;
    text-decoration: underline;
}

.agreement-line {
    height: 1px;
    background: #ded4c6;
}

.signup-submit {
    min-height: 54px;
    color: white;
    background: #071a31;
    border: 0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.signup-submit:hover {
    background: #12375c;
}

.signup-login-link {
    margin-top: 27px;
    padding-top: 22px;
    color: #706b64;
    text-align: center;
    border-top: 1px solid #e2d9cd;
    font-size: 13px;
}

.signup-login-link a {
    margin-left: 5px;
    color: #875615;
    font-weight: bold;
}

@media (max-width: 600px) {
    .signup-main {
        padding: 25px 14px 50px;
    }

    .signup-card {
        padding: 30px 21px;
    }

    .signup-inline-field {
        grid-template-columns: 1fr;
    }

    .check-button {
        min-height: 44px;
    }
}
/* DB 연결 전 임시 로그인 화면 */

.login-page {
    min-height: 100vh;
    margin: 0;
    color: #171a1e;
    background: #f6f1e8;
}

.login-header {
    color: white;
    background: #071a31;
}

.login-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #dfbd7d;
    border: 1px solid #c99a4d;
    border-radius: 50%;
    font-family: serif;
    font-size: 21px;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
}

.login-brand-text strong {
    font-family: serif;
    font-size: 23px;
}

.login-brand-text small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
}

.login-home-link {
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.login-main {
    width: min(100%, 540px);
    margin: 0 auto;
    padding: 70px 20px 90px;
}

.login-card {
    padding: 45px 48px;
    background: #fffdf8;
    border: 1px solid #dfd5c7;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(43, 32, 18, 0.13);
}

.login-heading {
    margin-bottom: 30px;
    text-align: center;
}

.login-heading > p {
    margin: 0;
    color: #9b671d;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.18em;
}

.login-heading h1 {
    margin: 4px 0 8px;
    color: #071a31;
    font-family: serif;
    font-size: 38px;
}

.login-heading span {
    color: #706b64;
    font-size: 13px;
}

.login-form {
    display: grid;
    gap: 21px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field label {
    color: #162235;
    font-size: 14px;
    font-weight: bold;
}

.login-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #d5cbbd;
    border-radius: 5px;
    outline: none;
    font-size: 15px;
}

.login-field input:focus {
    border-color: #c9963d;
    box-shadow: 0 0 0 3px rgba(201, 150, 61, 0.17);
}

.login-password-field {
    position: relative;
}

.login-password-field input {
    padding-right: 70px;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 51px;
    min-height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.login-submit {
    min-height: 54px;
    color: white;
    background: #071a31;
    border: 0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-message {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 5px;
    font-size: 13px;
}

.login-error {
    color: #9f2f25;
    background: #fff0ed;
    border: 1px solid #e5aaa3;
}

.demo-account {
    display: grid;
    gap: 3px;
    margin-top: 20px;
    padding: 15px;
    color: #665f56;
    background: #f4eee4;
    border: 1px solid #dfd5c7;
    border-radius: 5px;
    font-size: 12px;
}

.login-register {
    margin-top: 25px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid #e2d9cd;
    font-size: 13px;
}

.login-register a,
.user-name {
    color: #c9963d;
    font-weight: bold;
}

.user-menu {
    position: relative;
}
.dropdown-menu {
    display: none;

    position: absolute;
    top: calc(100% + 8px);
    right: 0;

    width: 170px;

    background: #ffffff;
    border-radius: 12px;

    padding: 8px 0;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);

    z-index: 9999;
}

.dropdown-menu.show {
    display: block;
}
.dropdown-menu a{
    display:block;
    padding:12px 16px;
    color:#333;
    text-decoration:none;
}

.dropdown-menu a:hover{
    background:#f3f3f3;
}

.dropdown-menu .danger{
    color:red;
}
.dropdown-menu.show {
    display: block;
}
.mypage-main {
    min-height: 100vh;
    padding: 60px 20px;
    background: #f5f6f8;
}

.mypage-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.mypage-container h1 {
    margin-bottom: 25px;
    color: #17233d;
}

.mypage-box {
    margin-bottom: 24px;
    padding: 28px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.mypage-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #17233d;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eeeeee;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {
    color: #777777;
}

.info-row strong {
    color: #222222;
    text-align: right;
}

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

.mypage-button {
    display: inline-block;
    padding: 12px 18px;
    color: #ffffff;
    background: #17345f;
    border-radius: 6px;
    text-decoration: none;
}

.mypage-button:hover {
    opacity: 0.9;
}

.danger-button {
    background: #c62828;
}

.mypage-bottom {
    text-align: center;
}

.mypage-back {
    color: #17345f;
    text-decoration: none;
}
.board-main {
    min-height: 100vh;
    padding: 60px 20px;
    background: #f4f6f9;
}

.board-container,
.board-form-container,
.board-view-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.board-form-container {
    max-width: 760px;
}

.board-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}

.board-heading h1,
.board-form-container h1 {
    margin: 0 0 10px;
    color: #16294a;
}

.board-heading p {
    margin: 0;
    color: #6d7582;
}

.board-heading-actions,
.board-form-actions,
.board-view-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-primary-button,
.board-outline-button,
.board-danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.board-primary-button {
    background: #183a68;
    color: #ffffff;
}

.board-outline-button {
    border-color: #183a68;
    background: #ffffff;
    color: #183a68;
}

.board-danger-button {
    background: #c62828;
    color: #ffffff;
}

.board-search {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.board-search input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #ccd1d8;
    border-radius: 7px;
    font-size: 15px;
}

.board-search button {
    padding: 0 20px;
    border: 0;
    border-radius: 7px;
    background: #183a68;
    color: #ffffff;
    cursor: pointer;
}

.board-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
}

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

.board-table th,
.board-table td {
    padding: 15px;
    border-bottom: 1px solid #eceef1;
    text-align: center;
}

.board-table th {
    background: #f8f9fb;
    color: #29364b;
}

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

.board-table td:nth-child(2),
.board-table th:nth-child(2) {
    text-align: left;
}

.board-number {
    width: 80px;
}

.board-author {
    width: 140px;
}

.board-date {
    width: 130px;
}

.board-title-link {
    color: #202b3c;
    text-decoration: none;
}

.board-title-link:hover {
    text-decoration: underline;
}

.board-secret-icon {
    margin-right: 5px;
}

.board-empty {
    padding: 45px !important;
    color: #7b828d;
}

.board-login-guide {
    margin-top: 18px;
    color: #6d7582;
    text-align: right;
}

.board-form {
    margin-top: 25px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.board-form-group {
    margin-bottom: 22px;
}

.board-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #27364e;
    font-weight: 700;
}

.board-form-group input,
.board-form-group textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 13px;
    border: 1px solid #ccd1d8;
    border-radius: 7px;
    font: inherit;
}

.board-form-group textarea {
    resize: vertical;
    line-height: 1.7;
}

.board-secret-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f7f8fa;
    border-radius: 8px;
    cursor: pointer;
}

.board-secret-check small {
    display: block;
    margin-top: 5px;
    color: #757d89;
}

.board-form-actions {
    justify-content: flex-end;
}

.board-error {
    margin-top: 20px;
    padding: 13px 15px;
    border-radius: 7px;
    background: #ffebee;
    color: #b71c1c;
}

.board-view-box {
    overflow: hidden;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.board-view-header {
    padding: 28px;
    border-bottom: 1px solid #eceef1;
}

.board-view-header h1 {
    margin: 8px 0 15px;
    color: #172a4a;
}

.board-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    color: #727a87;
    font-size: 14px;
}

.board-view-content {
    min-height: 260px;
    padding: 32px 28px;
    color: #2d3440;
    line-height: 1.8;
}

.board-secret-label {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 5px;
    background: #fff3e0;
    color: #b85d00;
    font-size: 13px;
}

.board-view-actions {
    justify-content: flex-end;
    margin-top: 20px;
}

.board-inline-form {
    margin: 0;
}

.board-secret-denied {
    padding: 70px 30px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.board-secret-lock {
    margin-bottom: 15px;
    font-size: 48px;
}

.board-secret-denied h1 {
    color: #172a4a;
}

.board-secret-denied p {
    margin-bottom: 25px;
    color: #727a87;
}

@media (max-width: 700px) {
    .board-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .board-heading-actions {
        flex-wrap: wrap;
    }

    .board-author,
    .board-date {
        display: none;
    }

    .board-form {
        padding: 22px 18px;
    }

    .board-view-meta {
        flex-direction: column;
        gap: 5px;
    }
}
.qna-main {
    min-height: 100vh;
    padding: 60px 20px;
    background: #f4f6f9;
}

.qna-container,
.qna-form-container,
.qna-view-container {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
}

.qna-form-container {
    max-width: 760px;
}

.qna-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
}

.qna-heading h1,
.qna-form-container h1 {
    margin: 0 0 10px;
    color: #172a4a;
}

.qna-heading p,
.qna-guide {
    margin: 0;
    color: #737b87;
}

.qna-heading-actions,
.qna-form-actions,
.qna-view-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qna-primary-button,
.qna-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.qna-primary-button {
    background: #183a68;
    color: #ffffff;
}

.qna-outline-button {
    border-color: #183a68;
    background: #ffffff;
    color: #183a68;
}

.qna-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
}

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

.qna-table th,
.qna-table td {
    padding: 15px;
    border-bottom: 1px solid #eceef1;
    text-align: center;
}

.qna-table th {
    background: #f8f9fb;
    color: #29364b;
}

.qna-table td:nth-child(2),
.qna-table th:nth-child(2) {
    text-align: left;
}

.qna-number {
    width: 75px;
}

.qna-author {
    width: 130px;
}

.qna-status {
    width: 110px;
}

.qna-date {
    width: 125px;
}

.qna-title-link {
    color: #202b3c;
    text-decoration: none;
}

.qna-status-waiting,
.qna-status-complete {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 13px;
}

.qna-status-waiting {
    background: #fff3e0;
    color: #b65b00;
}

.qna-status-complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.qna-empty {
    padding: 45px !important;
    color: #777f8a;
}

.qna-form {
    margin-top: 24px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
}

.qna-form-group {
    margin-bottom: 22px;
}

.qna-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.qna-form-group input,
.qna-form-group select,
.qna-form-group textarea,
.qna-answer-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 13px;
    border: 1px solid #ccd1d8;
    border-radius: 7px;
    font: inherit;
}

.qna-form-actions {
    justify-content: flex-end;
}

.qna-error {
    margin-top: 18px;
    padding: 13px 15px;
    background: #ffebee;
    color: #b71c1c;
}

.qna-view-box,
.qna-answer-box {
    background: #ffffff;
    border-radius: 12px;
}

.qna-view-header {
    padding: 28px;
    border-bottom: 1px solid #eceef1;
}

.qna-category {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 5px;
    background: #eef3fb;
    color: #183a68;
}

.qna-view-content {
    min-height: 220px;
    padding: 30px 28px;
    line-height: 1.8;
}

.qna-answer-box {
    margin-top: 22px;
    padding: 28px;
}

.qna-answer-content {
    padding: 20px;
    border-radius: 8px;
    background: #f7f9fc;
    line-height: 1.8;
}

.qna-answer-wait {
    padding: 22px;
    background: #f7f8fa;
    text-align: center;
}

.qna-answer-form button {
    margin-top: 12px;
}

.qna-view-actions {
    justify-content: flex-end;
    margin-top: 20px;
}
.board-view-attachment{
    margin-top:30px;
    padding-top:24px;
    border-top:1px solid #e2dbd3;
}

.board-view-attachment h2{
    margin:0 0 14px;
    font-size:18px;
}

.board-attachment-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:16px 18px;
    background:#f8f5f1;
    border:1px solid #ded5cc;
    border-radius:10px;
}

.board-attachment-info{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.board-attachment-large-icon{
    flex-shrink:0;
    font-size:24px;
}

.board-attachment-info div{
    min-width:0;
}

.board-attachment-info strong{
    display:block;
    overflow:hidden;
    color:#30251d;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.board-attachment-info small{
    display:block;
    margin-top:5px;
    color:#7b6e63;
}

.board-download-button{
    flex-shrink:0;
    padding:10px 16px;
    color:#fff;
    background:#76481d;
    border-radius:8px;
    font-size:14px;
    font-weight:700;
    text-decoration:none;
}

.board-download-button:hover{
    background:#5f3815;
}

.board-missing-file{
    margin:0;
    padding:16px;
    color:#9c3c32;
    background:#fff3f1;
    border:1px solid #efc9c4;
    border-radius:8px;
}

@media(max-width:600px){

    .board-attachment-box{
        align-items:stretch;
        flex-direction:column;
    }

    .board-download-button{
        text-align:center;
    }

}
.board-current-file{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:14px 16px;
    background:#f8f5f1;
    border:1px solid #ded5cc;
    border-radius:8px;
}

.board-remove-file{
    display:flex;
    align-items:center;
    gap:7px;
    color:#9d352d;
    font-size:14px;
    cursor:pointer;
}

.board-file-guide{
    display:block;
    margin-top:8px;
    color:#7b6e63;
    font-size:13px;
    line-height:1.6;
}
