/* 사이트 고정 폭. body 와 그 폭에 맞춰 그려지는 요소(로그인 상단·본문
   상자, 페이지 머리, 푸터)가 모두 이 값을 따른다 — 다섯 군데에 같은 숫자를
   적어두면 한 곳만 바뀌어 줄이 어긋난다.

   1110px 에서 1180px 로 넓혔다(#188). 요금제 시안의 카드 4장이 그 폭이라야
   시안과 같은 271px 로 놓인다. */
:root {
    --site-width: 1180px;
}

#header.header-scrolled {
    background: #fff;
    padding: 20px 0;
    height: 72px;
    transition: all 0.5s;
}

#header {
    padding: 25px 0;
    height: 82px;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    transition: all 0.5s;
    z-index: 997;
    background-color: #fff;
    box-shadow: 5px 0px 15px #c3c3c3;
}

#header #logo h1 {
    font-size: 24px;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
}

#header #logo h1 a, #header #logo h1 a:hover {
    color: #000;
    padding-left: 10px;
    border-left: 4px solid grey;
}

#nav-menu-container {
    float: right;
    margin: 0;
    position: relative;
    top: -20px;
}

.nav-menu > li {
    margin-left: 10px;
}

.nav-menu > li {
    float: left;
}

.nav-menu li {
    position: relative;
    white-space: nowrap;
}

.nav-menu, .nav-menu * {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-scrolled .nav-menu li:hover > a, .header-scrolled .nav-menu > .menu-active > a {
    color: #18d26e;
}

.header-scrolled .nav-menu a {
    color: black;
}

.nav-menu li:hover > a, .nav-menu > .menu-active > a {
    color: #0c8bc7;
}

.nav-menu a {
    padding: 0 8px 10px 8px;
    text-decoration: none;
    display: inline-block;
    color: #000;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    outline: none;
}

#mobile-nav-toggle {
    display: inline;
}

#mobile-nav-toggle {
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999;
    margin: 20px 20px 0 0;
    border: 0;
    background: none;
    font-size: 24px;
    display: none;
    transition: all 0.4s;
    outline: none;
    cursor: pointer;
}

#mobile-body-overly {
    width: 100%;
    height: 100%;
    z-index: 997;
    top: 0;
    left: 0;
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    display: none;
}

body.mobile-nav-active #mobile-nav {
    left: 0;
}

#mobile-nav {
    position: fixed;
    top: 0;
    padding-top: 18px;
    bottom: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.8);
    left: -260px;
    width: 260px;
    overflow-y: auto;
    transition: 0.4s;
}

#mobile-nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

#mobile-nav ul li {
    position: relative;
}

#mobile-nav ul li a {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    overflow: hidden;
    padding: 10px 22px 10px 15px;
    position: relative;
    text-decoration: none;
    width: 100%;
    display: block;
    outline: none;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
}

#mobile-nav ul .menu-has-children i.fa-chevron-up {
    color: #18d26e;
}

#mobile-nav ul .menu-has-children i {
    position: absolute;
    right: 0;
    z-index: 99;
    padding: 15px;
    cursor: pointer;
    color: #fff;
}

#mobile-nav ul .menu-item-active {
    color: #18d26e;
}

#mobile-nav ul li li {
    padding-left: 30px;
}

.menu-has-children ul {
    display: none;
}

.sf-arrows .sf-with-ul {
    padding-right: 30px;
}

.sf-arrows .sf-with-ul:after {
    content: "\f107";
    position: absolute;
    right: 15px;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    color: black;
}

.sf-arrows ul .sf-with-ul:after {
    content: "\f105";
}


.nav-menu li:hover > ul,
.nav-menu li.sfHover > ul {
    display: block;
}

.nav-menu ul {
    margin: 4px 0 0 0;
    padding: 10px;
    box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
    background: #fff;
}

.nav-menu ul {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    z-index: 99;
}

.sf-arrows .sf-with-ul {
    padding-right: 30px;
}

.nav-menu li {
    position: relative;
    white-space: nowrap;
}

.keyword_list {
    height: 300px;
    overflow-y: scroll;
}

#id_image_type {
    list-style: none;
    padding: 0;
}

#id_image_type li {
    display: inline;
}

#id_image_type li input {
    margin: 0 5px 0 10px;
}

@media (max-width: 768px) {
    #nav-menu-container {
        display: none;
    }

    #mobile-nav-toggle {
        display: inline;
    }
}


body {
    width: var(--site-width);
    margin: 50px auto !important;
    background-color: rgba(0, 0, 0, 0);
    /* 내용이 짧아도 푸터가 뷰포트 바닥에 붙도록 세로 여백(50px×2)을 뺀 높이를 채운다. */
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
}

/* 남는 높이는 본문이 가져가고, 푸터는 그 아래로 밀린다. */
body > .container {
    flex: 1 0 auto;
}

/* 로그인 화면은 자체 고정 레이아웃이다 — 안쪽 두 패널이 649px + 461px 로
   합계 1110px 에 맞춰져 있어, 사이트 폭을 따라 넓히면 그만큼 틈이 벌어진다.
   사이트 폭과 값이 같았을 뿐 같은 축이 아니므로 --site-width 를 쓰지 않는다. */
.login_top {
    width: 1110px;
    height: 70px;
}

.login_top .img-logo {
    float: left;
}

.login_top .img-logo-second {
    margin-left: 15px;
}

.login_wrapper {
    width: 1110px;
    height: 545px;
}

.login_wrapper .login_left_img {
    float: left;
    width: 649px;
    height: 545px;
}

.login_wrapper .login_right_wrapper {
    float: right;
    width: 461px;
    height: 545px;
    background-color: white;
}

.login_wrapper .login_right_wrapper .login_logo {
    margin-top: 80px;
    margin-left: 175px;
    position: relative;
}

.login_wrapper .login_right_wrapper .login_logo > span {
    font-size: 22px;
    font-weight: bold;
    color: #333333;
    margin-left: 7px;
    margin-top: 8px;
    position: absolute;
}

.login_wrapper .login_right_wrapper .login_form {
    margin-top: 70px;
}

.login_wrapper .login_right_wrapper button {
    margin-left: 40px;
    width: 371px;
    height: 62px;
    font-weight: bold;
    color: white;
    background-color: #3090d6;
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.login_wrapper .login_right_wrapper .login_form > div {
    margin-top: 10px;
    width: 451px;
    height: 50px;
    margin-bottom: 10px;
}

.login_wrapper .login_right_wrapper .login_form > div .login_label {
    margin-left: 40px;
    margin-top: 8px;
    font-size: 18px;
    color: #333333;
    width: 76px;
    font-weight: bold;
    line-height: 48px;
}

.login_wrapper .login_right_wrapper .login_form > div .login_input input {
    margin-right: 40px;
    padding: 0 0;
    float: right;
    width: 276px;
    height: 45px;
}

.login_wrapper .login_right_wrapper .login_save_form {
    margin-left: 40px;
    margin-top: 5px;
}

.login_wrapper .login_right_wrapper .login_save_form label {
    color: #333333;
    font-size: 14px;
}

/* body 가 --site-width 고정 폭이라 공용 헤더만 뷰포트 전체 폭으로 되돌리고,
   body 상단 50px 여백을 채워 랜딩과 동일하게 페이지 맨 위에 붙인다. */
.site-header {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: -50px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.create_button {
    border: none;
    background-color: #3090d6;
    height: 40px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    padding: 0 20px;
}
/* body 가 --site-width 고정 폭이라 공용 푸터만 뷰포트 전체 폭으로 되돌리고,
   body 하단 50px 여백까지 채워 랜딩과 동일하게 페이지 맨 아래에 붙인다. */
.site-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 40px;
    margin-bottom: -50px;
    flex-shrink: 0;
}
.wordpick_btn {
    font-size: 18px;
    color: white;
    background: #3090d6;
    border: 0;
    padding: 7px 15px;
}

/* ── 크레딧 잔액 표시 (#59) ──────────────────────────────────────────
   헤더·생성 화면·마이페이지가 공유하는 단일 컴포넌트. 세 화면이 따로 놀지
   않도록 정의를 한 곳에 두고 변형(--header/--strip/--card)만 나눈다.
   디자인 언어는 결제 화면(billing.css)과 같다 — 브랜드 블루 #3090d6,
   slate 중립색, radius 8px. */
.credit-status {
    --cs-brand: #3090d6;
    --cs-brand-deep: #2277b8;
    --cs-brand-tint: rgba(48, 144, 214, 0.1);
    --cs-ink-strong: #0f172a;
    --cs-muted: #64748b;
    --cs-warn: #b45309;
    --cs-warn-wash: #fffbeb;
    --cs-warn-line: #fcd34d;

    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    word-break: keep-all;
}

.credit-status-value {
    color: var(--cs-ink-strong);
}

/* 만료 임박 안내(#184). 잔액 안내와 같은 자리에 두되, 색만으로 알리지 않도록
   아이콘과 문구가 함께 바뀐다. */
.credit-status-note--expiry {
    color: #b25f00;
    font-weight: 600;
}

.credit-status-note {
    font-weight: normal;
    color: var(--cs-muted);
}

.credit-status i {
    color: var(--cs-brand);
    line-height: 1;
}

/* 잔액이 적을 때. 색만으로 알리지 않는다 — 아이콘·테두리·문구가 함께 바뀐다. */
.credit-status.is-low {
    background-color: var(--cs-warn-wash);
    border-color: var(--cs-warn-line);
}

.credit-status.is-low i,
.credit-status.is-low .credit-status-value {
    color: var(--cs-warn);
}

.credit-status-cta {
    font-weight: bold;
    color: var(--cs-brand-deep);
    text-decoration: underline;
}

/* 헤더 변형 — 상단 개인 메뉴 안에서 다른 링크와 같은 높이로 앉는다. */
.credit-status--header {
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #e3e3e3;
    background-color: #ffffff;
    font-size: 14px;
    color: #333333;
    transition: border-color 0.15s;
}

.credit-status--header:hover {
    border-color: var(--cs-brand);
    text-decoration: none;
    color: #333333;
}

.credit-status--header i {
    font-size: 15px;
}

/* 생성 화면 변형 — 폼 위에 가로로 눕는 안내 띠. */
.credit-status--strip {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
    padding: 11px 15px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 14px;
}

/* 마이페이지 변형 — 상단 4px 브랜드 바를 얹은 카드(결제 화면과 같은 시그니처). */
.credit-status--card {
    display: block;
    margin: 4px 0 18px;
    padding: 18px 20px;
    border: 1px solid #e3e3e3;
    border-top: 4px solid var(--cs-brand);
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: normal;
}

.credit-status--card .credit-status-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--cs-muted);
}

.credit-status--card .credit-status-value {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: -0.02em;
}

.credit-status--card .credit-status-note {
    display: block;
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.6;
}

.credit-status--card.is-low {
    border-top-color: #d97706;
}

.credit-status--card .credit-status-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    background-color: var(--cs-brand);
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
}

.credit-status--card .credit-status-cta:hover {
    background-color: var(--cs-brand-deep);
    color: #ffffff;
    text-decoration: none;
}

.credit-status a:focus-visible,
a.credit-status:focus-visible {
    outline: 3px solid rgba(48, 144, 214, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .credit-status--header {
        transition: none;
    }
}
