/* StoneAge Plus Classic v13 - Map Archive */

.map-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
    margin-bottom:24px;
    padding:16px 18px;
    background:#fff9ea;
    border:1px solid #d7c9a7;
}

.map-toolbar label{
    font-weight:700;
    color:#49351e;
}

.map-toolbar input{
    flex:1 1 280px;
    min-width:220px;
    padding:11px 12px;
    border:1px solid #cdbb94;
    background:#fffdf7;
    color:#49351e;
}

.map-toolbar output{
    margin-left:auto;
    color:#5d6b47;
    font-weight:700;
}

.map-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.map-card{
    display:flex;
    flex-direction:column;
    gap:10px;
    min-width:0;
    padding:14px;
    background:#fff9ea;
    border:1px solid #d8caab;
    color:#49351e;
    text-align:left;
    border-radius:0;
    box-shadow:none;
    cursor:pointer;
}

.map-card:hover{
    background:#edf2da;
    border-color:#93aa72;
}

.map-thumb{
    display:flex;
    align-items:center;
    justify-content:center;
    height:160px;
    background:#e7ead5;
    border:1px solid #ccd3ab;
    overflow:hidden;
}

.map-thumb img{
    max-width:100%;
    max-height:100%;
    display:block;
    object-fit:contain;
}

.map-card strong{
    font-size:18px;
    color:#49351e;
}

.map-card small{
    font-family:"Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
    color:#5f513b;
    line-height:1.6;
}

.map-dialog{
    width:min(980px,94vw);
    max-width:980px;
    color:#49351e;
}

.map-dialog-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
}

.map-dialog-header h2{
    margin:0;
    color:#49351e;
}

.map-dialog-header button{
    border:0;
    background:transparent;
    color:#49351e;
    font-size:20px;
    cursor:pointer;
}

.map-gallery{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:14px;
    margin-bottom:18px;
}

.map-figure{
    margin:0;
    padding:10px;
    background:#f9f4e7;
    border:1px solid #d6c8a7;
}

.map-figure img{
    display:block;
    width:100%;
    height:auto;
    object-fit:contain;
}

.map-source{
    margin:0 0 12px;
}

.map-source a{
    color:#456132;
    font-weight:700;
}

.map-desc{
    font-family:"Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
    line-height:1.8;
    color:#49351e;
    white-space:normal;
}

@media (max-width:600px){
    .map-thumb{height:130px;}
    .map-grid{grid-template-columns:1fr;}
    .map-gallery{grid-template-columns:1fr;}
    .map-toolbar output{
        width:100%;
        margin-left:0;
    }
}


/* 지도 상세 이미지 크게 보기 */
.map-dialog {
    width: min(1200px, 96vw) !important;
    max-width: 1200px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
}

.map-dialog .map-gallery {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
}

.map-dialog .map-figure {
    width: 100% !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.map-dialog .map-figure img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    cursor: zoom-in;
}

.map-dialog .map-detail {
    width: 100%;
    min-width: 0;
}


/* StoneAge Plus game guide dropdown */
.nav-items .sa-guide-menu {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-items .sa-guide-main {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.nav-items .sa-guide-arrow {
    border: 0;
    padding: 0 9px 0 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.nav-items .sa-guide-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 160px;
    z-index: 1000;
    padding: 7px;
    background: #fff9e8;
    border: 2px solid #b6a37a;
    border-radius: 7px;
    box-shadow: 0 7px 18px rgba(47,39,22,.19);
}

.nav-items .sa-guide-menu:hover .sa-guide-dropdown,
.nav-items .sa-guide-menu:focus-within .sa-guide-dropdown {
    display: block;
}

.nav-items .sa-guide-dropdown a {
    display: block;
    padding: 12px;
    border-radius: 5px;
    color: #49351e !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-items .sa-guide-dropdown a:hover,
.nav-items .sa-guide-dropdown a:focus {
    background: #e4edcf;
    color: #36552b !important;
}

@media (max-width: 700px) {
    .nav-items .sa-guide-dropdown {
        left: 0;
        width: 145px;
    }
}
