@charset "utf-8";
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-jp.min.css");
@import "//cdn.jsdelivr.net/npm/font-kopub@1.0/kopubbatang.min.css";
@import url('https://fonts.googleapis.com/css2?family=Zen+Old+Mincho&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1&family=Zen+Old+Mincho&display=swap');

/* 웹폰트는 이 위치에 넣어서 불러옵니다. */
  @font-face {
    font-family: "Pretendard JP Variable", "Pretendard JP", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Hiragino Sans", "Apple SD Gothic Neo", Meiryo, "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Osaka, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    src: url('../../../packages/pretendard/dist/web/variable/woff2/PretendardVariable.woff2') format('woff2-variations');
    font-weight: 400;
    font-style: normal;
}

/* 웹폰트는 이 위치에 넣어서 불러옵니다. */

/* 최상단에 추가 */
html.dark {
  --bg: #121212;
  --text: #eee;
  --accent: #e0e0e0;
  --accent2:  #99cd89;
  --ng: rgb(220, 0, 0);
  --card-bg: #1e1e1e;
  --border: #333;
  --muted: #aaa;
  --dot: #555;
  --shadow: rgba(255, 255, 255, 0.05);
  --white: #eee;
}


/* 모던하고 깔끔한 스타일의 기본 CSS */

:root {
  --bg: #fafafa;
  --text: #333;
  --accent: #333;
  --accent2:  #008000;
  --ng: rgb(180, 0, 0);
  --card-bg: #fff;
  --border: #ddd;
  --muted: #888;
  --dot: #ccc;
  --shadow: rgba(0, 0, 0, 0.05);
  --white: #fafafa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #eee;
    --accent: #e0e0e0;
    --accent2:  #99cd89;
    --ng: rgb(220, 0, 0);
    --card-bg: #1e1e1e;
    --border: #333;
    --muted: #aaa;
    --dot: #555;
    --shadow: rgba(255, 255, 255, 0.05);
    --white: #eee;
  }
}
::selection{ background-color: gray; color:white;}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent2);
}

body, html {
  margin: 0;
  padding: 0;
  font-family: "Pretendard Variable", Pretendard, "Pretendard JP", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

  footer {
    margin-top: auto; /* Footer를 화면 하단에 고정 */
    color: var(--text);
    text-align: center;
    padding: 20px 10px;
    font-size: 1em;
    line-height: 150%;
  }

button {
  font-family: inherit;
  border: none;
  outline: none;
}

input, textarea{
  font-family: inherit;
}

button {
  color: var(--text);
  background-color: transparent;
  max-width: 100%;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover:not(.scroll-top-btn) {
 color: var(--accent2);
}

img:not(.emoji){
  width: 100%;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
  background-color: var(--bg);
  margin-top: 10px;
  position: sticky;
  top: 0;
  z-index: 999;
}
nav button {
  background-color: transparent;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 10px;
  color: var(--text);
}
nav button.active {
  border-bottom: 2px solid var(--accent2);
  color: var(--accent2);
  font-weight: 700;
}

nav button:hover {
color: var(--accent2);
}

.parent{
 width: 100vw;
 display: flex;
 flex-direction: column;
 justify-content: center;
 align-items: center;
}

.wrapper{
  width: 100%;
  max-width: 900px;
}

.mainbox {
  background-color: transparent;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 40px;
}

#d-day {
  font-weight: bold;
  color: var(--text);
  font-size: 20px;
}

.align {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}
.dot {
  width: 8px;
  height: 8px;
  background-color: var(--dot);
  margin: 0 8px;
  border-radius: 50%;
}

.dots {
  width: 4px;
  height: 4px;
  background-color: var(--text);
  margin: 0 8px;
  border-radius: 50%;
}

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding-top: 5px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  display: none;
  z-index: 1000;
}
.scroll-top-btn.show {
  display: block;
}

input#search-input{
width: 100%;
max-width: 500px;
border: 1px solid var(--muted);
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.05);
color: var(--text);
font-size: 15px;
padding: 8px;
}

.submit {
  background-color: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 6px 12px;
}

.comment, .list {
  background-color: var(--card-bg);
  padding: 12px;
  margin-bottom: 10px;
}


.post-header{
  width: 100%;
  padding: 10px 30px 20px 30px;
  border-bottom: 2px solid var(--muted);
}


/* 각각 nav 아이템의 기준 */
.nav-item {
  position: relative;
}

/* 서브메뉴 기본 상태 */
.submenu {
  position: absolute;
  width: 80px;
  top: 101%; /* 버튼 바로 아래 */
  left: 0;
  background-color: var(--bg);
  border-top: 2px solid var(--bg);
  border-radius: 0px 0px 6px 6px;
  box-shadow: 0 5px 5px var(--shadow);
  list-style: none;
  padding: 2px 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 900;
}

/* hover 시 서브메뉴 활성화 */
.nav-item:hover .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 서브 메뉴 항목 */
.submenu li {
  padding: 0px;
  cursor: pointer;
  text-align: center;
}

@media (max-width: 768px) {
  nav {
    padding: 5px 0;
  }}

@media (max-width: 600px) {
  nav {
    flex-wrap: wrap;
  }
  .novelbox {
    flex-direction: column;
    gap: 8px;
  }

  .post-header{
    padding: 10px 20px 15px 20px;
  }

}

  .dark-toggle {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 26px;
    margin-right: 10px;
  }
  .dark-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    outline: 1.5px solid var(--muted);
  }
  .slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    outline: 1.5px solid #888;
  }
  input:checked + .slider {
    background-color: #333;
  }
  input:checked + .slider:before {
    transform: translateX(38px);
  }

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}


  p {
    font-family: 'KoPub Batang';
    font-size: 1.05em;
    line-height: 1.9em;
    letter-spacing: -0.5px;
    word-break: break-all;
    text-indent: 1em;
    margin-bottom: 1em;
  }

    .banner {
        width: 100%;
        max-width: 200px;
        aspect-ratio: 5 / 1; 
        border-radius: 10px;
        outline: solid 2px var(--muted);
        overflow: hidden;
        cursor: pointer;
        margin: 10px 0px 10px 0px;
        font-size: 1em;
        font-family: 'Pretendard';
        font-weight: 600;
        color: var(--text);
        background-color: var(--bg);
    }


    .bannerlist {
      width: 100%;
      max-width: 200px;
      aspect-ratio: 5 / 1; 
      border-radius: 8px;
      outline: solid 2px var(--text);
      overflow: hidden;
      cursor: pointer;
      margin: 10px;
  }

      /* 스크롤바의 폭 너비 */
    ::-webkit-scrollbar {
    width: 5px;  
    }

    ::-webkit-scrollbar-thumb {
    background: var(--muted); /* 스크롤바 색상 */
    border-radius: 10px; /* 스크롤바 둥근 테두리 */
    }

    ::-webkit-scrollbar-track {
    background: transparent;  /*스크롤바 뒷 배경 색상*/
    }
    ::-webkit-scrollbar-button {
    display: none;
    }


.header-bar{  display: flex; margin-top: 20px; align-items: center; justify-content: space-between;}


  @media(max-width: 900px){ 
      
  .header-bar{
    padding: 0px 8px;
    margin-top: 8px;
  }
  }

  
img.icon {
    display: block;
    width: 60%;
    height: auto;
}

img.profile {
  display: block;
  width: 55%;
  height: auto;
  border-radius: 50%;
  border: 2px solid var(--text);
}

img.logicon {
    width: 50px;
    height: 50px;
}


  td.imgTb {
  table-layout: fixed;
  vertical-align: middle;
}

#guestbookiframe{
  width: 100vw;
  max-width: 900px;
  height: 600px;
  border: none;
}

details > summary {
    cursor: pointer;
    transition: background 0.5s;
    line-height: 1.6;
}

details > div {
    margin-left: 1em;
    line-height: 1.6;
    }

details > summary::-webkit-details-marker {
    transform: rotate3d(0, 0, 1, 90deg);
    transition: transform 0.25s;
}
 
details[open] > summary::-webkit-details-marker {
    transform: rotate3d(0, 0, 1, 180deg);
}
 
details[open] > summary ~ * {
    animation: reveal 0.5s;
}
 

@keyframes reveal {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0);
    }
 
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}


.post-media {
      display: inline-block;
      width: 100%;
      margin-bottom: 15px;
      border: 1px solid var(--muted);
      padding: 0;
      border-radius: 10px;
      background: white;
      overflow: hidden;
    }
    .post-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }


.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-box {
  background-color: var(--card-bg);
  color: var(--text);
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow);
  text-align: center;
  max-width: 400px;
}

.popup-box button {
  margin-top: 16px;
  padding: 6px 16px;
  border-radius: 6px;
  background-color: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

.nsfw-tag {
  color: var(--ng);
  font-size: 0.75em;
  margin-left: 7px;
  background-color: rgba(255, 0, 0, 0.22);
  padding: 2px 6px;
  border-radius: 6px;
  height: 100%;
}

.emoji {
  height: 1em;
  vertical-align: -0.1em;
  margin: 0px 1px;
}
