/* === 1. 기본 설정 === */
  @font-face { 
    font-family: 'DungGeunMo'; 
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff'); 
    font-weight: normal; 
    font-style: normal; 
    font-display: swap; 
  }

  :root { 
    --panel-color: #fdf6e3; 
    --border-color: #5d4037; 
    --text-color: #3e2723; 
    --primary-color: #ff9800; 
    --secondary-color: #8d6e63; 
    --blue-color: #29b6f6; 
    --pink-color: #ff4081; 
    --green-color: #66bb6a; 
    --purple-color: #ab47bc; 
    --yellow-color: #fbc02d; 
    --light-blue: #4fc3f7; 
    --shadow-color: rgba(0,0,0,0.4); 
    --z-bg: -1; 
    --z-nav: 100; 
    --z-modal: 2000; 
    --z-swal: 9999; 
  }

  * { 
    box-sizing: border-box; 
    font-family: 'DungGeunMo', monospace; 
  }

  body { 
    margin: 0; 
    padding: 0; 
    min-height: 100vh; 
    color: var(--text-color); 
    background: url("https://antiochapp.github.io/TrapGame/bg_sky.png") no-repeat center bottom fixed; 
    background-size: cover; 
    padding-bottom: 30px; 
  }

  body::before { 
    content: ""; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-image: linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px); 
    background-size: 20px 20px; 
    z-index: var(--z-bg); 
    pointer-events: none; 
  }

  /* === 2. 공용 컴포넌트 === */
  .retro-box { 
    background: var(--panel-color); 
    border: 4px solid var(--border-color); 
    border-radius: 8px; 
    box-shadow: inset 4px 4px 0px #ffffff, inset -4px -4px 0px #d7ccc8, 8px 8px 0px var(--shadow-color); 
    position: relative; 
  }

  @keyframes float { 
    0% { transform: translateY(0px); } 
    50% { transform: translateY(-6px); } 
    100% { transform: translateY(0px); } 
  }

  .floating { 
    animation: float 3s ease-in-out infinite; 
  }

  /* === 3. 상단 공지 티커 === */
  .ticker-container { 
    background: #3e2723; 
    color: #ffff00; 
    overflow: hidden; 
    white-space: nowrap; 
    height: 30px; 
    line-height: 30px; 
    border-bottom: 2px solid #000; 
    position: relative; 
    z-index: 101; 
  }

  .ticker-content { 
    display: inline-block; 
    padding-left: 100%; 
    animation: marquee 40s linear infinite; 
    font-size: 14px; 
  }

  @keyframes marquee { 
    0% { transform: translate(0, 0); } 
    100% { transform: translate(-100%, 0); } 
  }

  /* === 4. 네비게이션 바 === */
  .nav-bar { 
    background: rgba(93, 64, 55, 0.95); 
    color: #fff8e1; 
    padding: 15px; 
    border-bottom: 4px solid #3e2723; 
    box-shadow: 0 4px 0 rgba(0,0,0,0.2); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-shadow: 2px 2px 0 #000; 
    z-index: var(--z-nav); 
    position: relative; 
  }

  .nav-top-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .app-title { 
    font-size: 22px; 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    letter-spacing: 1px; 
  }

  .church-icon { 
  font-size: 32px; 
  cursor: pointer; 
  transition: transform 0.1s; 
  filter: drop-shadow(2px 2px 0 #000); 
  position: relative;
  top: -5px; /* PC에서 아이콘을 위로 올림 */
}

  .secret-trigger:active .church-icon { 
    transform: scale(0.9); 
  }

  #txt-app-title { 
    display: inline-block; 
  }

  .title-top, .title-bottom { 
  display: inline !important;
  font-size: inherit !important; /* 부모 요소의 28px 크기 상속 */
  font-weight: inherit !important;
  color: inherit !important;
  margin: 0 2px !important; /* 글자 사이 약간의 간격 */
}

  .login-bar { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    z-index: 101; 
    font-size: 12px; 
  }

  .btn-log { 
    background: #3e2723; 
    color: #fff; 
    border: 1px solid #fff; 
    padding: 3px 8px; 
    cursor: pointer; 
    font-family: 'DungGeunMo'; 
  }

  .user-name-link { 
    cursor: pointer; 
    text-decoration: underline; 
    transition: color 0.2s; 
  }

  .user-name-link:hover { 
    color: #ffeb3b; 
  }

  /* === 5. 메뉴 그리드 === */
  .menu-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 8px; 
    width: 100%; 
    max-width: 700px; 
  }

  @media (min-width: 600px) { 
    .menu-grid { 
      grid-template-columns: repeat(6, 1fr); 
    } 
  }

  .pixel-btn { 
    position: relative; 
    border: 3px solid #000; 
    border-radius: 8px; 
    color: #fff; 
    cursor: pointer; 
    font-size: 13px; 
    padding: 10px 2px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 5px; 
    top: 0; 
    left: 0; 
    transition: all 0.1s; 
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5); 
  }

  .pixel-btn:active { 
    top: 4px; 
    left: 4px; 
    box-shadow: inset 4px 4px 0 rgba(0,0,0,0.2) !important; 
  }

  .menu-icon { 
    font-size: 18px; 
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3)); 
  }

  /* 메뉴 버튼 색상 */
  .btn-visit { 
    background: var(--primary-color); 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #e65100, 4px 4px 0 2px #000; 
  }

  .btn-prayer { 
    background: var(--blue-color); 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #0288d1, 4px 4px 0 2px #000; 
  }

  .btn-ride { 
    background: var(--green-color); 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #388e3c, 4px 4px 0 2px #000; 
  }

  .btn-member { 
    background: var(--secondary-color); 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #5d4037, 4px 4px 0 2px #000; 
  }

  .btn-gallery { 
    background: var(--purple-color); 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #7b1fa2, 4px 4px 0 2px #000; 
  }

  .btn-qt { 
    background: var(--light-blue); 
    color: #fff; 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #0288d1, 4px 4px 0 2px #000; 
  }

  .btn-playground { 
    background: var(--yellow-color); 
    color: #fff; 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #f9a825, 4px 4px 0 2px #000; 
  }

  .btn-worship { 
    background: #5e35b1; 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #4527a0, 4px 4px 0 2px #000; 
  }

  .btn-talent { 
    background: #009688; 
    color: #fff; 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #00695c, 4px 4px 0 2px #000; 
  }

  .btn-submit-form { 
    background: var(--primary-color); 
    width: 100%; 
    font-size: 18px; 
    padding: 12px; 
    margin-top: 20px; 
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #e65100, 4px 4px 0 2px #000; 
  }

  /* === 6. 컨테이너 & 캘린더 === */
  .container { 
    max-width: 800px; 
    margin: 30px auto; 
    padding: 0 15px; 
  }

  #calendar-container { 
    padding: 20px; 
    background: #fff; 
  }

  .toggle-label { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 16px; 
    cursor: pointer; 
    user-select: none; 
  }

  .custom-checkbox { 
    width: 24px; 
    height: 24px; 
    border: 3px solid var(--border-color); 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2); 
  }

  .custom-checkbox::after { 
    content: "v"; 
    font-weight: bold; 
    color: var(--text-color); 
    display: none; 
    margin-top: -3px; 
  }

  input[type="checkbox"] { 
    display: none; 
  }

  input[type="checkbox"]:checked + .custom-checkbox { 
    background: var(--primary-color); 
  }

  input[type="checkbox"]:checked + .custom-checkbox::after { 
    display: block; 
  }

  /* FullCalendar 커스터마이징 */
  .fc { 
    font-family: 'DungGeunMo', monospace !important; 
  }

  .fc-theme-standard td, .fc-theme-standard th { 
    border-color: var(--border-color) !important; 
    border-width: 2px !important; 
  }

  .fc .fc-toolbar-title { 
    font-size: 24px !important; 
    text-shadow: 2px 2px 0 #ddd; 
  }

  .fc .fc-button-primary { 
    background: var(--secondary-color) !important; 
    border: 3px solid #000 !important; 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.4) !important; 
    font-family: 'DungGeunMo' !important; 
  }

  .fc .fc-button-primary:active { 
    transform: translate(2px, 2px); 
    box-shadow: 2px 2px 0 rgba(0,0,0,0.4) !important; 
  }

  .fc-daygrid-day-number, .fc-col-header-cell-cushion { 
    color: var(--text-color) !important; 
    text-decoration: none !important; 
  }

  .fc-event { 
    border: 2px solid #000 !important; 
    border-radius: 0 !important; 
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3); 
    font-size: 12px !important; 
    padding: 2px !important; 
    cursor: pointer; 
  }

  .evt-icon-only { 
    background-color: transparent !important; 
    border: none !important; 
    box-shadow: none !important; 
    text-align: center; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
  }

  .evt-icon-content { 
    font-size: 20px; 
    filter: drop-shadow(2px 2px 0 rgba(255,255,255,0.7)); 
    transition: transform 0.1s; 
  }

  .evt-icon-content:hover { 
    transform: scale(1.2); 
  }

  /* === 7. 모달 시스템 === */
  .modal { 
    display: none; 
    position: fixed; 
    z-index: var(--z-modal); 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(60, 40, 20, 0.7); 
    justify-content: center; 
    align-items: center; 
    backdrop-filter: blur(2px); 
  }

  .modal-content { 
    width: 95%; 
    max-width: 500px; 
    padding: 25px; 
    max-height: 90vh; 
    overflow-y: auto; 
  }

  h2 { 
    margin-top: 0; 
    color: var(--text-color); 
    text-align: center; 
    font-size: 28px; 
    text-shadow: 2px 2px 0 #fff, 3px 3px 0 rgba(0,0,0,0.2); 
    border-bottom: 3px dashed var(--secondary-color); 
    padding-bottom: 15px; 
  }

  .close { 
    position: absolute; 
    right: 20px; 
    top: 15px; 
    font-size: 32px; 
    color: var(--border-color); 
    cursor: pointer; 
    text-shadow: 2px 2px 0 #fff; 
  }

  /* === 8. 폼 요소 === */
  label { 
    display: block; 
    margin-top: 15px; 
    font-size: 16px; 
    color: var(--border-color); 
    font-weight: bold; 
  }

  input, select, textarea { 
    width: 100%; 
    padding: 10px; 
    margin-top: 5px; 
    border: 3px solid var(--border-color); 
    font-size: 16px; 
    background: #fff; 
    font-family: 'DungGeunMo'; 
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1); 
  }

  input:focus, textarea:focus { 
    outline: none; 
    border-color: var(--primary-color); 
    background: #fffbf0; 
  }

  textarea { 
    resize: vertical; 
    min-height: 80px; 
    line-height: 1.5; 
  }

  .file-input-wrapper { 
    margin-top: 10px; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    border: 2px dashed #8d6e63; 
    padding: 10px; 
    background: #fffbf0; 
  }

  .file-input-wrapper input { 
    padding: 5px; 
    border: none; 
    background: transparent; 
  }

  /* === 9. 탭 시스템 === */
  .tab-container { 
    display: flex; 
    margin-bottom: 15px; 
    gap: 5px; 
    border-bottom: 3px solid var(--border-color); 
    padding-bottom: 5px; 
    overflow-x: auto; 
  }

  .tab-btn { 
    flex: 1; 
    padding: 10px; 
    border: 3px solid var(--border-color); 
    background: #d7ccc8; 
    font-family: 'DungGeunMo'; 
    font-size: 14px; 
    cursor: pointer; 
    color: var(--text-color); 
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.2); 
    min-width: 70px; 
  }

  .tab-btn.active { 
    background: var(--panel-color); 
    border-bottom: none; 
    margin-bottom: -3px; 
    box-shadow: inset 2px 2px 0 #fff; 
  }

  /* === 10. 게시판 공통 스타일 === */
  .archive-list { 
    margin-top: 15px; 
  }

  .archive-item { 
    background: #fff; 
    border: 3px solid var(--border-color); 
    border-radius: 4px; 
    padding: 10px; 
    margin-bottom: 10px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1); 
  }

  .archive-title { 
    font-weight: bold; 
    font-size: 16px; 
  }

  .archive-date { 
    font-size: 12px; 
    color: var(--secondary-color); 
  }

  .post-item { 
    padding: 15px; 
    border-bottom: 3px dashed var(--secondary-color); 
    cursor: pointer; 
    background: #fff; 
    margin-bottom: 5px; 
    border: 3px solid transparent; 
  }

  .post-item:hover { 
    border: 3px solid var(--primary-color); 
    background: #fffbf0; 
  }

  /* 번역 버튼 그룹 */
  .trans-btn-group {
    display: inline-flex;
    gap: 2px;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .trans-btn {
    background: #eee;
    border: 1px solid #000;
    cursor: pointer;
    font-size: 10px;
    padding: 2px 4px;
    font-family: 'DungGeunMo', sans-serif;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  }

  .trans-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
  }

  .trans-en { 
    background: #e3f2fd; 
    color: #0d47a1; 
  }

  .trans-ko { 
    background: #ffebee; 
    color: #b71c1c; 
  }

  .pixel-btn.view-btn {
    background: var(--blue-color);
    color: #fff;
    min-width: 70px;
    padding: 10px 8px;
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.4), 4px 4px 0 #0288d1, 4px 4px 0 2px #000;
  }

  /* === 11. 멤버 카드 === */
  .member-card { 
    text-align: center; 
    margin-top: 20px; 
    background: #fff; 
    border: 3px solid var(--border-color); 
    padding: 15px; 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2); 
  }

  .profile-icon { 
    font-size: 50px; 
    border: 3px solid var(--border-color); 
    display: inline-block; 
    padding: 0; 
    background: #fffbf0; 
    overflow: hidden; 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    line-height: 100px; 
  }

  .profile-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
  }

  .blurred-content { 
    filter: blur(6px); 
    opacity: 0.7; 
    user-select: none; 
    pointer-events: none; 
  }

  .btn-request { 
    background: var(--pink-color); 
    color: white; 
    border: 3px solid #000; 
    padding: 10px 20px; 
    font-family: 'DungGeunMo'; 
    font-size: 16px; 
    cursor: pointer; 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3); 
    position: relative; 
    display: block; 
    margin: 15px auto 0 auto; 
  }

  .member-list-item { 
    padding: 12px; 
    border-bottom: 2px dashed #d7ccc8; 
    cursor: pointer; 
    background: #fff; 
    font-size: 16px; 
  }

  .member-list-item:hover { 
    background: #fffbf0; 
    color: var(--primary-color); 
  }

  /* === 12. 갤러리 === */
  .gallery-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 10px; 
  }

  .gallery-card { 
    background: #fff; 
    border: 3px solid #000; 
    padding: 10px; 
    cursor: pointer; 
    transition: transform 0.1s; 
  }

  .gallery-card:active { 
    transform: scale(0.98); 
  }

  .gallery-media-box { 
    width: 100%; 
    height: 200px; 
    background: #000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    margin-bottom: 5px; 
    position: relative; 
  }

  .gallery-media-box img, .gallery-media-box video { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
  }

  .gallery-count-badge { 
    position: absolute; 
    bottom: 5px; 
    right: 5px; 
    background: rgba(0,0,0,0.7); 
    color: #fff; 
    padding: 2px 6px; 
    font-size: 12px; 
    border-radius: 4px; 
  }

  .pagination { 
    display: flex; 
    justify-content: center; 
    gap: 5px; 
    margin-top: 15px; 
  }

  .page-num { 
    width: 30px; 
    height: 30px; 
    border: 2px solid #000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    background: #fff; 
  }

  .page-num.active { 
    background: var(--primary-color); 
    color: #fff; 
  }

  /* === 13. SweetAlert2 커스터마이징 === */
  div:where(.swal2-container) { 
    z-index: var(--z-swal) !important; 
  }

  div:where(.swal2-popup) { 
    background: var(--panel-color) !important; 
    border: 4px solid var(--border-color) !important; 
    font-family: 'DungGeunMo' !important; 
    box-shadow: 8px 8px 0 rgba(0,0,0,0.4) !important; 
    border-radius: 0 !important; 
  }

  div:where(.swal2-title) { 
    color: var(--text-color) !important; 
    text-shadow: 2px 2px 0 #fff; 
    border-bottom: 2px dashed var(--secondary-color); 
    padding-bottom: 10px; 
  }

  div:where(.swal2-html-container) { 
    color: #3e2723 !important; 
    font-size: 1.1em !important; 
  }

  div:where(.swal2-actions) button { 
    border: 3px solid #000 !important; 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.4) !important; 
    font-family: 'DungGeunMo' !important; 
    border-radius: 0 !important; 
    margin: 0 5px !important; 
  }

  div:where(.swal2-actions) button:active { 
    transform: translate(2px, 2px); 
    box-shadow: 2px 2px 0 rgba(0,0,0,0.4) !important; 
  }

  div:where(.swal2-styled.swal2-confirm) { 
    background-color: var(--primary-color) !important; 
    color: #fff !important; 
  }

  div:where(.swal2-styled.swal2-deny) { 
    background-color: var(--pink-color) !important; 
  }

  div:where(.swal2-styled.swal2-cancel) { 
    background-color: var(--secondary-color) !important; 
  }

  .swal2-input, .swal2-textarea {
    width: 100% !important; 
    margin: 0 !important; 
    box-sizing: border-box !important;
    border: 3px solid var(--border-color) !important;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1) !important;
    background: #fff !important;
    color: var(--text-color) !important;
    font-family: 'DungGeunMo' !important;
    border-radius: 0 !important;
  }

  .swal2-input:focus, .swal2-textarea:focus {
    border-color: var(--primary-color) !important;
    background: #fffbf0 !important;
    outline: none !important;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1) !important;
  }

  .swal2-top-layer { 
    z-index: 99999 !important; 
  }

  .swal2-actions {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-top: 20px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .swal2-actions button {
    font-family: 'DungGeunMo' !important;
    border: 3px solid #000 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    color: #fff !important;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3) !important;
    flex: 0 0 auto !important;
    min-width: 120px !important;
  }

  .swal2-confirm {
    background-color: #ff9800 !important;
    order: 1 !important;
    margin-right: auto !important;
  }

  .swal2-deny {
    background-color: #8d6e63 !important;
    order: 2 !important;
    margin-left: auto !important;
  }

  .swal2-cancel {
    background-color: #999 !important;
    order: 3 !important;
  }

  .swal2-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.4) !important;
  }

  .swal2-actions button:active {
    transform: translateY(2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3) !important;
  }

  .retro-label { 
    text-align: left; 
    margin-bottom: 5px; 
    display: block; 
    color: var(--secondary-color); 
    font-size: 0.9em; 
  }

  .retro-input-group { 
    margin-bottom: 15px; 
    width: 100%; 
  }

  /* === 14. 언어 선택 모달 === */
  #langModal { 
    display: flex; 
    z-index: 99999; 
  }

  .lang-btn { 
    width: 100%; 
    padding: 20px; 
    font-size: 20px; 
    margin-bottom: 10px; 
    border: 3px solid #000; 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3); 
    cursor: pointer; 
    font-family: 'DungGeunMo'; 
    transition: 0.1s; 
  }

  .lang-btn:active { 
    transform: translate(2px, 2px); 
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3); 
  }

  .lang-ko { 
    background: var(--primary-color); 
    color: #fff; 
  }

  .lang-en { 
    background: var(--blue-color); 
    color: #fff; 
  }

  .btn-back { 
    background: #d7ccc8; 
    color: #3e2723; 
    width: auto; 
    display: inline-block; 
    margin-bottom: 10px; 
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.2) !important; 
    text-shadow: none; 
  }

  /* === 15. 달란트 시스템 === */
  .coin-jar { 
    width: 100px; 
    height: 100px; 
    background: #fff; 
    border: 4px solid #ffca28; 
    border-radius: 50%; 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
    overflow: hidden; 
  }

  .jar-fill { 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
    background: #ffca28; 
    opacity: 0.7; 
    transition: height 1s; 
  }

  .jar-txt { 
    position: relative; 
    z-index: 2; 
    font-weight: bold; 
    font-size: 18px; 
    color: #3e2723; 
  }

  .btn-brown-pop {
    background: #4e342e; 
    color: #fff; 
    width: 100%; 
    margin-top: 10px; 
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.2), 3px 3px 0 rgba(0,0,0,0.3);
  }

  .rank-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px; 
    border-bottom: 2px dashed #d7ccc8; 
    font-size: 15px; 
  }

  .rank-badge { 
    display: inline-block; 
    width: 24px; 
    height: 24px; 
    border-radius: 50%; 
    color: #fff; 
    text-align: center; 
    line-height: 24px; 
    font-size: 12px; 
    margin-right: 8px; 
    border: 2px solid rgba(0,0,0,0.2); 
    box-shadow: 1px 1px 0 rgba(0,0,0,0.3); 
  }

  .rank-1 { 
    background: #FFD700; 
    color: #5d4037; 
    font-weight: bold; 
  }

  .rank-2 { 
    background: #C0C0C0; 
    color: #5d4037; 
    font-weight: bold; 
  }

  .rank-3 { 
    background: #CD7F32; 
    color: #5d4037; 
    font-weight: bold; 
  }

  .rank-other { 
    background: #8d6e63; 
  }

  /* === 16. 메인 공지 박스 === */
  .main-notice-wrapper {
    max-width: 800px;
    margin: 0 auto 15px auto; 
    padding: 0 15px;
    display: none; 
  }

  .main-notice-box {
    background: #fff;
    border: 4px solid var(--primary-color); 
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s;
  }

  .main-notice-box:active {
    transform: translateY(2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  }

  .main-notice-header {
    padding: 12px 15px;
    background: var(--panel-color);
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px dashed transparent; 
  }

  .main-notice-badge {
    background: red;
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    animation: blink 2s infinite;
  }

  @keyframes blink { 
    0% {opacity:1;} 
    50% {opacity:0.7;} 
    100% {opacity:1;} 
  }

  .main-notice-content {
    padding: 15px;
    background: #fff;
    border-top: 2px dashed var(--border-color);
    display: none; 
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
  }

  .btn-main-check {
    margin-left: 10px;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border: 2px solid #000;
    font-family: 'DungGeunMo';
  }

  .check-active { 
    background: #4caf50; 
    color: white; 
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.2); 
  }

  .check-inactive { 
    background: #ddd; 
    color: #555; 
  }

  /* === 17. 홈피드 (새로운 글) === */
  .home-feed-wrapper {
    max-width: 800px;
    margin: 15px auto;
    padding: 0 15px;
  }

  .home-feed-box {
    background: #fff;
    border: 4px solid #000;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.25);
  }

  .home-feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    margin-bottom: 10px;
  }

  .home-feed-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
  }

  .feed-nav-group {
    margin-left: auto;
    display: flex;
    gap: 5px;
  }

  .feed-nav-btn {
    background: #fff;
    border: 2px solid #000;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  }

  .feed-nav-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
  }

  .feed-nav-btn:disabled {
    background: #eee;
    color: #ccc;
    border-color: #ccc;
    cursor: default;
    box-shadow: none;
    transform: none;
  }

  .home-feed-list .feed-item {
    border: 2px solid #000;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fafafa;
  }

  .home-feed-list .feed-item:hover { 
    background: #f3f3f3;
  }

  .feed-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 10px; 
  }

  .feed-item-main { 
    flex: 1; 
    min-width: 0; 
  }

  .feed-item-title { 
    font-weight: 800; 
  }

  .feed-item-meta { 
    font-size: 12px; 
    color: #777; 
    margin-top: 4px; 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap;
  }

  .feed-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 2px solid #000;
    background: #fff;
  }

  .feed-item-actions { 
    display: flex; 
    gap: 6px; 
    flex-shrink: 0; 
  }

  .feed-translate-btn {
    border: 3px solid #000;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    background: var(--secondary-color);
    color: #fff;
    box-shadow: inset 3px 3px 0 rgba(255,255,255,0.35), 4px 4px 0 rgba(0,0,0,0.35);
    line-height: 1;
  }

  .feed-translate-btn:active {
    transform: translate(2px,2px);
    box-shadow: inset 4px 4px 0 rgba(0,0,0,0.25);
  }

  .feed-translate-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
  }

  /* === 18. 알림 센터 === */
  .notif-badge {
    position: absolute;
    top: -6px; 
    right: -6px;
    background: #e53935;
    color: #fff;
    border: 2px solid #000;
    border-radius: 999px;
    font-size: 11px;
    padding: 0 6px;
    min-width: 18px;
    text-align: center;
  }

  .notification-list { 
    max-height: 150px; 
    overflow-y: auto; 
    background: #fff; 
    border: 2px inset #ddd; 
    padding: 5px; 
  }

  .notif-item { 
    border-bottom: 1px dashed #ccc; 
    padding: 5px; 
    font-size: 13px; 
    text-align: left; 
  }

  .notif-header { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 2px; 
  }

  .notif-msg { 
    color: #333; 
    margin-bottom: 2px; 
  }

  .notif-source { 
    font-size: 10px; 
    color: #888; 
  }

  .notif-card-new {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .notif-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
  }

  .notif-card-new:active {
    transform: scale(0.98);
  }

  .notif-icon-area {
    width: 40px;
    height: 40px;
    background: #fff8e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid #ffe082;
  }

  .notif-content-area {
    flex: 1;
    min-width: 0;
  }

  .notif-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }

  .notif-badge-pill {
    background: var(--secondary-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
  }

  .notif-date {
    font-size: 11px;
    color: #999;
  }

  .notif-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .notif-sub {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
  }

  .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* === 19. QT 출석 시스템 === */
  .attendance-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 5px; 
    margin-top: 10px; 
  }

  .att-cell { 
    aspect-ratio: 1/1; 
    border: 1px solid #ccc; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 12px; 
    color: #ccc; 
    position: relative; 
  }

  .att-cell.stamped { 
    border-color: #ff9800; 
    color: #3e2723; 
    font-weight: bold; 
    background: #fff8e1; 
  }

  .att-cell.stamped::after { 
    content: '✓'; 
    position: absolute; 
    font-size: 20px; 
    opacity: 0.8; 
  }

  .nav-arrow-btn { 
    background: none; 
    border: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: var(--secondary-color); 
    padding: 0 10px; 
  }

  .nav-arrow-btn:active { 
    transform: scale(0.9); 
    color: var(--primary-color); 
  }

  @keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
  }

  /* === 20. 오디오 플레이어 === */
  .audio-player-wrapper {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fffbf0;
    border: 3px solid #5d4037;
    border-radius: 10px;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.1);
    text-align: center;
  }

  .retro-audio {
    width: 100%;
    margin-top: 8px;
    height: 40px;
    filter: sepia(20%) contrast(95%);
    border-radius: 30px;
  }

  /* === 21. 풍선 이벤트 === */
  .balloon-event {
    position: fixed;
    width: 60px;
    height: 75px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    cursor: pointer;
    z-index: 9999;
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.15), 1px 1px 2px rgba(0,0,0,0.2);
    background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.9) 5%, rgba(255,255,255,0.2) 60%, transparent 100%);
    transition: transform 5s linear;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  .balloon-event::after {
    content: '';
    position: absolute;
    bottom: -35px;
    left: 50%;
    width: 1px;
    height: 50px;
    background: rgba(80, 80, 80, 0.6);
    transform: translateX(-50%) translateZ(-20px);
  }

  @keyframes bobbing {
    0% { margin-top: 0px; rotate: -2deg; }
    50% { margin-top: -25px; rotate: 2deg; }
    100% { margin-top: 0px; rotate: -2deg; }
  }

  .balloon-bob {
    animation: bobbing 3s ease-in-out infinite;
  }

  /* === 22. 투표(Poll) 시스템 === */
  .poll-box {
    margin-top: 12px;
    padding: 10px;
    border: 3px solid #000;
    border-radius: 12px;
    background: #f6fbff;
  }

  .poll-title { 
    font-weight: 900; 
    margin-bottom: 8px; 
  }

  .poll-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border: 2px solid #000;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    margin-bottom: 6px;
  }

  .poll-option.selected { 
    background: #e8f5e9; 
  }

  .poll-stats { 
    font-size: 12px; 
    color: #666; 
    margin-top: 6px; 
  }

  /* === 23. RSVP 시스템 === */
  .evt-rsvp-area {
    margin-top: 12px;
    padding: 10px;
    border: 3px dashed #000;
    border-radius: 12px;
    background: #fffdf2;
  }

  .evt-rsvp-title { 
    font-weight: 900; 
    margin-bottom: 6px; 
  }

  .evt-rsvp-status { 
    font-size: 13px; 
    color: #555; 
    margin-bottom: 8px; 
    white-space: pre-wrap; 
  }

  .evt-rsvp-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }

  .btn-rsvp-action {
    flex: 1;
    padding: 12px 0;
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    border: 2px solid #000;
  }

  .bg-attend { 
    background: #4caf50; 
  }

  .bg-maybe { 
    background: #ff9800; 
  }

  .bg-decline { 
    background: #f44336; 
  }

  .btn-rsvp-admin {
    width: 100%;
    margin-top: 10px;
    background: #9c27b0;
    color: white;
    padding: 10px;
  }

  /* === 24. 댓글 시스템 === */
  .comment-box { 
    margin-bottom: 5px;
  }

  /* === 25. 필터 & 정렬 버튼 === */
  .filter-btn, .sort-btn {
    padding: 6px 12px;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
    font-family: 'DungGeunMo';
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s;
  }

  .filter-btn:hover, .sort-btn:hover {
    background: #f0f0f0;
  }

  .filter-btn.active, .sort-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
  }

  .btn-send-code {
    background: var(--blue-color);
    color: white;
    width: 100%;
    margin-top: 15px; 
  }

  /* ==========================================
     📚 성경공부 게시판 레이아웃
     ========================================== */
  .bs-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .bs-badge-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }

  .bs-category-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  }

  .bs-quiz-badge {
    background: #2196f3;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  }

  .bs-title {
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    word-break: keep-all !important;
    margin: 0 !important;
    color: var(--text-color);
  }

  .bs-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #777 !important;
    margin: 0 !important;
    gap: 10px;
  }

  .bs-stats {
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ==========================================
     🎮 성경퀴즈 UI 시스템 (통합 최종본)
     ========================================== */

  /* 전체 컨테이너 */
  #bibleStudyQuizArea {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin-top: 20px;
  }

  /* 시작 화면 */
  .quiz-start-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 35px 20px !important;
    border-radius: 18px !important;
    color: #fff !important;
    text-align: center !important;
    font-family: 'DungGeunMo', monospace !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
  }

  .quiz-start-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 15px,
      rgba(255, 255, 255, 0.08) 15px,
      rgba(255, 255, 255, 0.08) 30px
    );
    animation: patternSlide 25s linear infinite;
    z-index: 0;
  }

  @keyframes patternSlide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
  }

  .quiz-start-container > * {
    position: relative;
    z-index: 1;
  }

  .quiz-start-container h2 {
    font-size: 26px !important;
    font-family: 'DungGeunMo', monospace !important;
    color: #fff !important;
    border: none !important;
    margin-bottom: 20px !important;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  }

  /* 풀이 화면 */
  .quiz-solve-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 25px 20px !important;
    border-radius: 18px !important;
    color: #fff !important;
    font-family: 'DungGeunMo', monospace !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
  }

  .quiz-solve-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(
      90deg,
      #667eea,
      #667eea 20px,
      #f093fb 20px,
      #f093fb 40px,
      #6BCB77 40px,
      #6BCB77 60px
    );
    animation: stripeMove 3s linear infinite;
  }

  @keyframes stripeMove {
    0% { background-position: 0px 0px; }
    100% { background-position: 60px 0px; }
  }

  /* 문제 박스 */
  .quiz-question-box {
    background: #fff !important;
    color: #333 !important;
    padding: 25px 20px !important;
    border-radius: 15px !important;
    margin: 20px 0 !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
  }

  .quiz-question-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #FF6B6B, #feca57, #4D96FF, #f093fb);
    background-size: 400% 100%;
    animation: rainbowMove 4s ease infinite;
  }

  @keyframes rainbowMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  .quiz-question-text {
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1.7 !important;
    font-family: 'DungGeunMo', monospace !important;
    color: #2d3436 !important;
    margin-bottom: 15px !important;
  }

  /* 객관식 선택지 */
  .quiz-answer-option {
    background: #fff !important;
    border: 3px solid #e9ecef !important;
    padding: 18px 20px !important;
    margin: 12px 0 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'DungGeunMo', monospace !important;
    color: #333 !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
  }

  .quiz-answer-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    z-index: 0;
  }

  .quiz-answer-option:hover::before {
    width: 400px;
    height: 400px;
  }

  .quiz-answer-option:hover {
    border-color: #667eea !important;
    background: #f8f9ff !important;
    transform: translateY(-2px) !important;
  }

  .quiz-answer-option.selected {
    border-color: #4caf50 !important;
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3) !important;
    animation: selectedBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  @keyframes selectedBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.05); }
  }

  .quiz-answer-option span:first-child {
    background: #667eea !important;
    color: white !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: bold !important;
    font-family: 'DungGeunMo', monospace !important;
    flex-shrink: 0 !important;
    z-index: 1;
    position: relative;
  }

  .quiz-answer-option.selected span:first-child {
    background: white !important;
    color: #4caf50 !important;
    animation: labelSpin 0.5s ease-out !important;
  }

  @keyframes labelSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
  }

  /* 주관식 입력창 */
  .quiz-answer-input {
    width: 100% !important;
    padding: 18px 20px !important;
    font-size: 16px !important;
    border: 3px solid #dfe6e9 !important;
    border-radius: 12px !important;
    background: white !important;
    font-family: 'DungGeunMo', monospace !important;
    box-sizing: border-box !important;
    margin: 15px 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  .quiz-answer-input:focus {
    border-color: #667eea !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
  }

  /* 버튼 완전 통일 */
  .quiz-submit-btn, .quiz-save-btn {
    padding: 0 !important;
    height: 52px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-family: 'DungGeunMo', monospace !important;
    border: none !important;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2) !important;
    transition: transform 0.1s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
  }

  .quiz-submit-btn::before, .quiz-save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
  }

  .quiz-submit-btn:hover::before, .quiz-save-btn:hover::before {
    left: 100%;
  }

  .quiz-submit-btn:active, .quiz-save-btn:active {
    transform: translateY(4px) !important;
    box-shadow: none !important;
  }

  .quiz-submit-btn {
    background: #4caf50 !important;
    color: white !important;
    flex: 2 !important;
  }

  .quiz-save-btn {
    background: #ff9800 !important;
    color: white !important;
    flex: 1 !important;
  }

  /* 진행률 바 */
  .quiz-progress-container {
    margin: 20px 0 !important;
    width: 100% !important;
    position: relative;
  }

  .quiz-progress-bar {
    height: 12px !important;
    background: rgba(255,255,255,0.3) !important;
    border-radius: 20px !important;
    border: 2px solid white !important;
    overflow: hidden !important;
    width: 100% !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .quiz-progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #4D96FF 0%, #f093fb 50%, #6BCB77 100%);
    border-radius: 20px !important;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
    overflow: hidden;
  }

  .quiz-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.6),
      transparent
    );
    animation: progressShimmer 2.5s infinite;
  }

  @keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }

  /* 주관식 안내 박스 */
  .quiz-subjective-notice {
    background: #e8f5e9 !important;
    border: 3px solid #4caf50 !important;
    padding: 18px !important;
    border-radius: 12px !important;
    margin: 15px 0 !important;
    text-align: center !important;
    font-family: 'DungGeunMo', monospace !important;
    color: #2e7d32 !important;
    font-weight: bold;
    animation: noticeGlow 3s ease-in-out infinite alternate !important;
  }

  @keyframes noticeGlow {
    0% { box-shadow: 0 0 20px rgba(107, 203, 119, 0.3); }
    100% { box-shadow: 0 0 30px rgba(107, 203, 119, 0.6); }
  }

  /* 결과 화면 */
  .quiz-result-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 50px 40px !important;
    border-radius: 25px !important;
    text-align: center !important;
    color: white !important;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5) !important;
    margin-bottom: 40px !important;
    position: relative;
    overflow: hidden;
    animation: resultAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes resultAppear {
    0% { transform: scale(0.3) rotateZ(-10deg); opacity: 0; }
    100% { transform: scale(1) rotateZ(0deg); opacity: 1; }
  }

  .quiz-result-box::before {
    content: '🎉';
    position: absolute;
    font-size: 180px;
    opacity: 0.15;
    top: -40px;
    right: -40px;
    animation: celebrationSpin 8s linear infinite;
  }

  @keyframes celebrationSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  .quiz-score-big {
    font-size: 72px !important;
    font-weight: 900 !important;
    margin: 25px 0 !important;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3) !important;
    animation: scoreReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both !important;
  }

  @keyframes scoreReveal {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
  }

  /* 랭킹 테이블 */
  .quiz-ranking-table {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    margin-bottom: 40px;
    overflow: hidden;
    animation: tableSlideUp 0.8s ease-out 0.3s both;
  }

  @keyframes tableSlideUp {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
  }

  .quiz-ranking-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 70px 1fr 90px 110px;
    gap: 15px;
    font-weight: 900;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }

  .quiz-ranking-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 110px;
    gap: 15px;
    padding: 18px;
    border-bottom: 2px dashed #e9ecef;
    align-items: center;
    transition: all 0.4s ease;
    border-radius: 12px;
    animation: rowFadeIn 0.5s ease-out;
  }

  @keyframes rowFadeIn {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }

  .quiz-ranking-row:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }

  .quiz-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 18px;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    animation: badgePopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid white;
  }

  @keyframes badgePopIn {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0deg); }
  }

  .quiz-rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.2);
    animation: goldGlow 2s ease-in-out infinite alternate;
  }

  @keyframes goldGlow {
    0% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.2); }
    100% { box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 8px 20px rgba(0, 0, 0, 0.3); }
  }

  .quiz-rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  }

  .quiz-rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
  }

  .quiz-rank-other {
    background: linear-gradient(135deg, #4D96FF 0%, #667eea 100%);
  }

  /* 퀴즈 작성 카드 */
  .quiz-question-card {
    background: #fff;
    border: 3px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
  }

  .quiz-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2196f3;
  }

  .quiz-remove-btn {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
  }

  .quiz-option-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    align-items: center;
  }

  .quiz-option-input {
    flex: 1;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
  }

  .quiz-correct-check {
    width: 20px;
    height: 20px;
    cursor: pointer;
  }

  /* === 26. 떠다니는 타이머 HUD === */
  .quiz-floating-hud {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    background: rgba(45, 52, 54, 0.95) !important;
    color: #55efc4 !important;
    padding: 15px 25px !important;
    border-radius: 50px !important;
    border: 4px solid rgba(255, 255, 255, 0.3) !important;
    font-family: 'DungGeunMo', monospace !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 15px rgba(85, 239, 196, 0.8) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    animation: hudFloat 2s ease-in-out infinite !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  @keyframes hudFloat {
    0%, 100% { 
      transform: translateY(0px) scale(1); 
      box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    }
    50% { 
      transform: translateY(-8px) scale(1.05); 
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
  }

  .quiz-floating-hud:hover {
    transform: translateY(-5px) scale(1.1) rotate(3deg) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
  }

  .quiz-floating-hud.unlimited {
    background: rgba(116, 185, 255, 0.95) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 15px 50px rgba(116, 185, 255, 0.6) !important;
  }

  .quiz-floating-hud.urgent {
    background: rgba(255, 107, 107, 0.95) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 1) !important;
    animation: hudUrgent 0.4s ease-in-out infinite !important;
    box-shadow: 0 0 40px rgba(255, 107, 107, 1), 0 15px 50px rgba(255, 107, 107, 0.8) !important;
  }

  @keyframes hudUrgent {
    0%, 100% { 
      transform: translateY(0px) scale(1) rotate(-2deg); 
    }
    25% { 
      transform: translateY(-5px) scale(1.15) rotate(2deg); 
    }
    50% { 
      transform: translateY(-10px) scale(1.12) rotate(-2deg); 
    }
    75% { 
      transform: translateY(-5px) scale(1.15) rotate(2deg); 
    }
  }

  /* ==========================================
     📱 모바일 최적화 (반응형)
     ========================================== */
  @media (max-width: 768px) {
    /* 캘린더 */
    .fc-event-title, .fc-event-time { 
      display: none !important; 
    }

    .fc-daygrid-event-dot { 
      display: none !important; 
    }

    .fc-event:not(.evt-icon-only) { 
      width: 16px !important; 
      height: 16px !important; 
      border-radius: 50% !important; 
      margin: 1px auto !important; 
      border: 1px solid #000 !important; 
      background-color: transparent !important; 
      display: flex !important; 
      justify-content: center !important; 
      align-items: center !important; 
    }

    .fc .fc-toolbar-title { 
      font-size: 18px !important; 
    }

    .fc .fc-button { 
      padding: 4px 8px !important; 
      font-size: 12px !important; 
    }

    .fc-toolbar-chunk { 
      display: flex; 
      align-items: center; 
    }

    /* 성경공부 게시판 */
    .bs-badge-row {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      margin-bottom: 8px;
    }

    .bs-title {
      font-size: 15px !important;
    }

    .bs-meta {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 4px !important;
    }

    /* 성경퀴즈 */
    .quiz-start-container {
      padding: 25px 15px !important;
    }

    .quiz-start-container h2 {
      font-size: 22px !important;
    }

    .quiz-solve-container {
      padding: 20px 15px !important;
    }

    .quiz-question-box {
      padding: 20px 15px !important;
    }

    .quiz-question-text {
      font-size: 16px !important;
    }

    .quiz-answer-option {
      padding: 15px !important;
      font-size: 15px !important;
      gap: 12px !important;
    }

    .quiz-answer-option span:first-child {
      width: 32px !important;
      height: 32px !important;
      font-size: 14px !important;
    }

    .quiz-submit-btn, .quiz-save-btn {
      font-size: 14px !important;
      height: 48px !important;
    }

    /* 떠다니는 타이머 모바일 위치 조정 */
    .quiz-floating-hud {
      top: 15px !important;
      left: 50% !important;
      right: auto !important;
      transform: translateX(-50%) !important;
      padding: 12px 20px !important;
      font-size: 24px !important;
      min-width: 150px !important;
      text-align: center !important;
    }

    .quiz-floating-hud:hover {
      transform: translateX(-50%) translateY(-5px) scale(1.1) !important;
    }

    @keyframes hudFloat {
      0%, 100% { 
        transform: translateX(-50%) translateY(0px) scale(1); 
      }
      50% { 
        transform: translateX(-50%) translateY(-8px) scale(1.05); 
      }
    }

    @keyframes hudUrgent {
      0%, 100% { 
        transform: translateX(-50%) translateY(0px) scale(1) rotate(-2deg); 
      }
      25% { 
        transform: translateX(-50%) translateY(-5px) scale(1.15) rotate(2deg); 
      }
      50% { 
        transform: translateX(-50%) translateY(-10px) scale(1.12) rotate(-2deg); 
      }
      75% { 
        transform: translateX(-50%) translateY(-5px) scale(1.15) rotate(2deg); 
      }
    }

    .quiz-ranking-header,
    .quiz-ranking-row {
      grid-template-columns: 60px 1fr 80px 100px;
      font-size: 14px;
    }

    .quiz-rank-badge {
      width: 45px;
      height: 45px;
      font-size: 16px;
    }
  }

  @media (max-width: 600px) {
    /* 네비게이션 */
    .nav-bar {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      padding: 10px 15px !important;
      height: auto !important;
    }

    .nav-top-row {
      display: flex !important;
      justify-content: space-between !important; 
      align-items: center !important;
      width: 100% !important;
      margin-bottom: 15px !important;
    }

    .app-title {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.church-icon {
  font-size: 28px !important; 
  flex-shrink: 0;
  top: 0 !important; /* 모바일에서는 위치 조정 해제 */
}

#txt-app-title {
  display: inline-block !important;
  flex-direction: row !important;
  align-items: center !important;
  line-height: 1.2;
  white-space: nowrap;
  font-size: 28px !important; /* 기존 19px보다 약 1.5배 크게 */
  font-weight: bold !important;
  color: #fff !important;
}

.title-top { 
  font-size: 14px; 
  color: #ffecb3; 
  font-weight: normal; 
}

.title-bottom { 
  font-size: 19px; 
  font-weight: bold; 
  color: #fff; 
}

    .login-bar {
      position: static !important;
      width: auto !important;
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
      gap: 6px; 
      flex-shrink: 0;
    }

    #welcome-msg { 
      display: inline-block !important;
      max-width: 60px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      color: #fff;
      margin-right: 2px;
      vertical-align: middle;
    }

    #btn-login, #btn-logout {
      font-size: 12px !important;
      padding: 6px 10px !important;
      white-space: nowrap;
      height: 34px;
    }

    #btn-notif {
      height: 34px;
      width: 34px;
      padding: 0 !important;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .menu-grid {
      width: 100% !important;
      margin-top: 0 !important;
    }
  }

  @media (max-width: 480px) {
    .nav-bar { 
      padding-top: 15px !important; 
    }

    .app-title { 
      margin-bottom: 10px !important; 
      text-align: center; 
    }

    .login-bar {
      position: static !important;
      top: auto !important;
      right: auto !important;
      width: 100%;
      margin: 0 0 10px 0;
      display: flex !important;
      justify-content: center;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .btn-log { 
      font-size: 12px; 
      padding: 4px 8px; 
    }

    .user-name-link { 
      max-width: 100%; 
      white-space: nowrap; 
      overflow: hidden; 
      text-overflow: ellipsis; 
    }

    .filter-btn, .sort-btn {
      font-size: 11px !important;
      padding: 6px 10px !important;
      margin: 2px !important;
    }

    #bibleStudySearch {
      font-size: 14px !important;
      padding: 8px !important;
    }

    .archive-item {
      padding: 12px !important;
    }

    .pixel-btn.view-btn {
      font-size: 12px !important;
      padding: 8px 12px !important;
      min-width: 60px !important;
    }

    .bs-badge-row {
      flex-direction: row !important;
      flex-wrap: wrap !important;
      gap: 4px !important;
    }
  }

  /* === 27. 애니메이션 (공용) === */
  @keyframes popIn { 
    from { opacity: 0; transform: scale(0.9); } 
    to { opacity: 1; transform: scale(1); } 
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
  }

  @keyframes startButtonPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(107,203,119,0.5); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(107,203,119,0.7); }
  }

  /* === 4컷 만화 PC 뷰어 전용 === */
.desktop-comic-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.desktop-comic-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
  border: 1px solid #333;
}

.desktop-comic-image.zoomed {
  cursor: zoom-out;
}

.desktop-comic-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
}

.desktop-control-btn {
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.9);
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.desktop-control-btn:active {
  transform: scale(0.95);
}

.desktop-help-guide {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12px;
  backdrop-filter: blur(3px);
}