  /* === 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: linear-gradient(180deg, #87CEEB 0%, #E0F0FF 60%, #FFF8E7 100%) 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: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  .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: 920px;
    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;
  }

  /* Custom Scrollbar for Excel */
  .jexcel_content::-webkit-scrollbar {
    width: 16px;
    height: 16px;
  }

  .jexcel_content::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-left: 2px solid #000;
  }

  .jexcel_content::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border: 2px solid #000;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5);
  }

  .jexcel_content::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
  }

  /* === Excel Tab Buttons (Redesigned for Readability) === */
  .excel-tab {
    background: #eee;
    color: #333 !important;
    /* Ensure readable text */
    font-weight: bold;
    border: 3px solid #ccc;
  }

  .excel-tab.active {
    color: #fff !important;
    border-color: #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;
  }

  /* === 14. Firebase Chat (New) === */
  #chat-container {
    margin-bottom: 25px;
    /* Calendar 위 간격 */
  }

  .chat-messages-box {
    background: #fff;
    border: 3px solid var(--border-color);
    height: 180px;
    overflow-y: auto;
    padding: 10px;
    font-size: 14px;
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .chat-msg {
    line-height: 1.4;
    word-break: break-all;
  }

  .chat-user {
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 4px;
  }

  .chat-time {
    font-size: 10px;
    color: #aaa;
    margin-left: 5px;
  }

  .chat-form {
    display: flex;
    gap: 8px;
  }

  /* Scrollbar Customization for Chat */
  .chat-messages-box::-webkit-scrollbar {
    width: 10px;
  }

  .chat-messages-box::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  .chat-messages-box::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border: 2px solid #000;
  }

  .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: center !important;
    gap: 15px !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;
  }

  .swal2-deny {
    background-color: #8d6e63 !important;
  }

  .swal2-cancel {
    background-color: #999 !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: 920px;
    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: 920px;
    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;
    display: block;
  }

  @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;
    }

    .bs-badge-row {
      flex-wrap: wrap;
      gap: 4px;
    }

    .bs-category-badge,
    .bs-quiz-badge,
    .bs-ranking-btn,
    .visibility-badge {
      font-size: 10px;
      padding: 3px 6px;
    }

    /* ✅ 멤버 수정 폼 모바일 최적화 */
    .file-input-wrapper {
      padding: 8px;
    }

    .retro-input-group {
      margin-bottom: 12px;
    }

    /* ✅ Swal 버튼 모바일 */
    .swal2-actions button {
      min-width: 100px;
      font-size: 14px;
      padding: 8px 15px;
    }

    /* ✅ 퀴즈 랭킹 테이블 모바일 */
    .quiz-ranking-header,
    .quiz-ranking-row {
      grid-template-columns: 60px 1fr 90px;
      font-size: 13px;
    }
  }

  @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);
  }

  .bs-ranking-btn {
    background: #9c27b0;
    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);
    cursor: pointer;
    transition: transform 0.1s;
    border: none;
  }

  .bs-ranking-btn:hover {
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  }

  .bs-ranking-btn:active {
    transform: translateY(1px);
    box-shadow: none;
  }

  /* 공개범위 배지 스타일 */
  .visibility-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    border: 1px solid;
    display: inline-block;
  }

  .visibility-badge.public {
    color: #2e7d32;
    border-color: #2e7d32;
    background: rgba(46, 125, 50, 0.1);
  }

  .visibility-badge.member {
    color: #d32f2f;
    border-color: #d32f2f;
    background: rgba(211, 47, 47, 0.1);
  }

  /* 청년QT 상세 버튼 예외 처리 */
  .youth-qt-detail .swal2-actions {
    justify-content: space-between !important;
  }

  /* 놀이터 버튼 호버 효과 개선 */
  #playgroundModal .pixel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
  }

  #playgroundModal .pixel-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  }

  /* 기도나눔 - 기도하겠습니다 버튼 */
  .btn-prayer-like-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #5d4037;
    border: 2px solid #d7ccc8;
    border-radius: 24px;
    padding: 8px 20px;
    font-family: 'DungGeunMo', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(93, 64, 55, 0.15);
    white-space: nowrap;
  }

  .btn-prayer-like-new:hover {
    background: linear-gradient(135deg, #ffecb3 0%, #ffe082 100%);
    box-shadow: 0 3px 10px rgba(93, 64, 55, 0.25);
    transform: translateY(-1px);
  }

  .btn-prayer-like-new:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(93, 64, 55, 0.2);
  }

  .btn-prayer-like-new span {
    background: #8d6e63;
    color: #fff;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
  }

  /* === Pet System Styles === */
  .pet-dead {
    filter: grayscale(100%);
    opacity: 0.7;
    pointer-events: none;
  }

  .pet-timer-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    border: 2px solid #fff;
  }

  .floating {
    animation: float 3s ease-in-out infinite;
  }

  /* === Pet Container === */
  .pet-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 9999;
    pointer-events: none;
  }

  .pet-character {
    position: absolute;
    bottom: 0px;
    left: 50%;
    font-size: 48px;
    cursor: pointer;
    pointer-events: auto;
    /* transition: transform 0.2s; - Removed for smooth JS movement */
    filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.3));
    user-select: none;
    image-rendering: pixelated;
  }

  .pet-character:hover {
    transform: scale(1.1);
  }

  .pet-character.bounce {
    animation: pet-bounce 0.5s infinite alternate;
  }

  .pet-character.pet-hatching {
    animation: pet-hatch-shake 0.3s ease-in-out infinite;
  }

  @keyframes pet-hatch-shake {

    0%,
    100% {
      transform: translateX(-50%) rotate(0deg);
    }

    25% {
      transform: translateX(-50%) rotate(-15deg) scale(1.1);
    }

    75% {
      transform: translateX(-50%) rotate(15deg) scale(1.1);
    }
  }

  /* 기도 말풍선 글로우 이펙트 */
  @keyframes prayer-glow {
    0% {
      box-shadow: 0 0 8px rgba(255, 152, 0, 0.4), 0 0 16px rgba(255, 152, 0, 0.1);
      transform: translateX(-50%) scale(1);
    }

    100% {
      box-shadow: 0 0 16px rgba(255, 152, 0, 0.7), 0 0 32px rgba(255, 152, 0, 0.3);
      transform: translateX(-50%) scale(1.05);
    }
  }

  @keyframes prayer-bounce {
    0% {
      transform: translateY(0) rotate(0deg);
    }

    100% {
      transform: translateY(-4px) rotate(10deg);
    }
  }

  /* === Pet Treasure === */
  .pet-treasure {
    position: absolute;
    bottom: 0px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10005;
    pointer-events: auto;
    animation: treasure-bounce 1s infinite alternate;
    filter: drop-shadow(0 0 5px gold);
  }

  @keyframes treasure-bounce {
    from {
      transform: translateY(0);
    }

    to {
      transform: translateY(-10px);
    }
  }

  @keyframes pet-bounce {
    from {
      transform: translateY(0);
    }

    to {
      transform: translateY(-10px);
    }
  }

  /* === Poop & Death System === */
  .pet-poop {
    position: absolute;
    bottom: 0px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    pointer-events: auto;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
  }

  .pet-poop:hover {
    transform: scale(1.2);
  }

  .pet-sick {
    filter: sepia(1) hue-rotate(50deg) saturate(3) !important;
    animation: pet-shiver 0.5s infinite;
  }

  .pet-starving {
    filter: sepia(1) hue-rotate(-50deg) saturate(3) !important;
    /* Reddish/Pale */
    animation: pet-shiver 0.2s infinite;
    /* Fast shiver */
  }

  .pet-lonely {
    filter: hue-rotate(180deg) opacity(0.8) !important;
    /* Blueish/Ghostly */
    animation: pet-sway 2s infinite ease-in-out;
  }

  @keyframes pet-shiver {
    0% {
      transform: translateX(0);
    }

    25% {
      transform: translateX(2px);
    }

    50% {
      transform: translateX(0);
    }

    75% {
      transform: translateX(-2px);
    }

    100% {
      transform: translateX(0);
    }
  }

  @keyframes pet-sway {

    0%,
    100% {
      transform: rotate(-5deg);
    }

    50% {
      transform: rotate(5deg);
    }
  }

  .death-timer-container {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    z-index: 10002;
    font-family: 'DungGeunMo';
    display: none;
    text-shadow: 2px 2px 4px #000;
    width: 200px;
  }

  .ghost-anim {
    font-size: 40px;
    animation: ghost-float 2s infinite ease-in-out;
    margin-bottom: 10px;
  }

  @keyframes ghost-float {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-10px);
    }
  }

  .pet-menu {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 3px solid #000;
    padding: 10px;
    border-radius: 8px;
    width: 160px;
    pointer-events: auto;
    font-family: 'DungGeunMo';
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10000;
  }

  .pet-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #000 transparent;
  }

  .pet-stats {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .stat-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
  }

  .stat-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border: 1px solid #aaa;
    margin-top: 2px;
    border-radius: 3px;
    overflow: hidden;
  }

  .stat-bar-mini {
    flex: 1;
    height: 6px;
    background: #eee;
    border: 1px solid #aaa;
    border-radius: 3px;
    overflow: hidden;
  }

  .stat-fill {
    height: 100%;
    transition: width 0.3s;
  }

  .stat-fill.exp {
    background: #ab47bc;
  }

  .stat-fill.hunger {
    background: #ff9800;
  }

  .stat-fill.fun {
    background: #29b6f6;
  }

  .pet-actions {
    display: flex;
    gap: 4px;
  }

  .pixel-btn-mini {
    flex: 1;
    background: #eee;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 11px;
    padding: 4px 0;
    font-family: 'DungGeunMo';
  }

  .pixel-btn-mini:hover {
    background: #e0e0e0;
  }

  .pixel-btn-mini:active {
    background: #ccc;
  }

  /* === Pet Speech Bubble === */
  .pet-speech-bubble {
    position: absolute;
    /* Changed from fixed to absolute */
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #000;
    padding: 8px 12px;
    border-radius: 12px;
    font-family: 'DungGeunMo';
    font-size: 12px;
    max-width: 200px;
    text-align: center;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }

  .pet-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent;
  }

  /* === Pet Animations === */
  .pet-walking {
    animation: pet-walk 0.3s infinite;
  }

  @keyframes pet-walk {

    0%,
    100% {
      transform: translateY(0) scaleY(1);
    }

    50% {
      transform: translateY(-3px) scaleY(0.95);
    }
  }

  .pet-sleeping {
    animation: petBreathing 3s ease-in-out infinite;
  }

  @keyframes petBreathing {

    0%,
    100% {
      transform: scale(1);
      filter: brightness(0.7);
    }

    50% {
      transform: scale(1.05);
      filter: brightness(0.75);
    }
  }

  @keyframes sleepBubbleFloat {
    0% {
      opacity: 0;
      transform: translateX(-50%) translateY(0) scale(0.8);
    }

    20% {
      opacity: 1;
    }

    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: translateX(-50%) translateY(-30px) scale(1.2);
    }
  }

  .point-float {
    position: fixed;
    color: #4caf50;
    font-weight: bold;
    font-size: 16px;
    font-family: 'DungGeunMo';
    pointer-events: none;
    z-index: 10001;
    opacity: 1;
    transition: all 1s ease-out;
  }

  @keyframes floatUp {
    0% {
      transform: translateY(0);
      opacity: 1;
    }

    100% {
      transform: translateY(-30px);
      opacity: 0;
    }
  }

  /* ==========================================
     🔧 Excel 관리자 UI 개선 (v21.1)
     ========================================== */

  /* Excel 탭 버튼 - 가독성 대폭 개선 */
  .excel-tab {
    background: #f0f0f0 !important;
    color: #444 !important;
    font-weight: bold !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.15s ease !important;
    flex-direction: row !important;
    gap: 4px !important;
  }

  .excel-tab:hover {
    background: #e0e0e0 !important;
    border-color: #999 !important;
    transform: translateY(-1px);
  }

  .excel-tab.active {
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    transform: translateY(0);
  }

  /* 각 탭별 active 색상 */
  .excel-tab[data-sheet="qt_today"].active {
    background: #039be5 !important;
  }

  .excel-tab[data-sheet="qt_comic"].active {
    background: #039be5 !important;
  }

  .excel-tab[data-sheet="qt_pastor"].active {
    background: #039be5 !important;
  }

  .excel-tab[data-sheet="qt_youth"].active {
    background: #039be5 !important;
  }

  .excel-tab[data-sheet="bible_study"].active {
    background: #7e57c2 !important;
  }

  .excel-tab[data-sheet="prayers"].active {
    background: #26a69a !important;
  }

  .excel-tab[data-sheet="notices"].active {
    background: #e53935 !important;
  }

  .excel-tab[data-sheet="freeboard"].active {
    background: #1e88e5 !important;
  }

  .excel-tab[data-sheet="archives"].active {
    background: #43a047 !important;
  }

  .excel-tab[data-sheet="gallery"].active {
    background: #fb8c00 !important;
  }

  /* === PC에서 Jspreadsheet (Excel) UI 대폭 개선 === */
  @media (min-width: 769px) {

    /* 관리자 모달 폭 확대 */
    #adminModal .modal-content {
      max-width: 95vw !important;
      width: 95vw !important;
    }

    /* 스프레드시트 컨테이너 */
    #spreadsheet {
      min-height: 65vh !important;
      border-radius: 8px !important;
      overflow: hidden !important;
    }

    /* 행 높이 및 셀 스타일 증가 */
    .jexcel tbody td {
      padding: 10px 8px !important;
      font-size: 14px !important;
      line-height: 1.5 !important;
      min-height: 44px !important;
      vertical-align: middle !important;
      white-space: pre-wrap !important;
      word-break: break-word !important;
      border: 1px solid #e0e0e0 !important;
    }

    /* 헤더 스타일 */
    .jexcel thead td {
      padding: 12px 8px !important;
      font-size: 13px !important;
      font-weight: bold !important;
      background: #37474f !important;
      color: #fff !important;
      border: 1px solid #263238 !important;
      text-shadow: none !important;
      white-space: nowrap !important;
      text-align: center !important;
      letter-spacing: 0.5px !important;
    }

    /* 행 번호 열 */
    .jexcel tbody td:first-child {
      background: #eceff1 !important;
      color: #546e7a !important;
      font-weight: bold !important;
      font-size: 12px !important;
      text-align: center !important;
      min-width: 45px !important;
      border-right: 2px solid #b0bec5 !important;
    }

    /* 줄무늬 (짝수 행) */
    .jexcel tbody tr:nth-child(even) td {
      background: #fafafa !important;
    }

    .jexcel tbody tr:nth-child(odd) td {
      background: #fff !important;
    }

    /* 행 호버 */
    .jexcel tbody tr:hover td {
      background: #e3f2fd !important;
    }

    /* 선택된 셀 */
    .jexcel tbody td.highlight {
      background: #bbdefb !important;
      border: 2px solid #1976d2 !important;
    }

    /* ID 열 (2번째 td = 첫 데이터 열) */
    .jexcel tbody td:nth-child(2) {
      font-size: 11px !important;
      color: #78909c !important;
    }

    /* 스크롤바 */
    .jexcel_content::-webkit-scrollbar {
      width: 10px !important;
      height: 10px !important;
    }

    .jexcel_content::-webkit-scrollbar-track {
      background: #f5f5f5 !important;
      border: none !important;
    }

    .jexcel_content::-webkit-scrollbar-thumb {
      background: #90a4ae !important;
      border-radius: 5px !important;
      border: 2px solid #f5f5f5 !important;
      box-shadow: none !important;
    }

    .jexcel_content::-webkit-scrollbar-thumb:hover {
      background: #607d8b !important;
    }

    /* 탭 그룹 */
    .excel-tab-group {
      gap: 8px !important;
    }

    .excel-tab {
      padding: 10px 18px !important;
      font-size: 13px !important;
    }
  }

  /* === 모바일 Excel 최적화 === */
  @media (max-width: 768px) {
    .jexcel tbody td {
      padding: 6px 4px !important;
      font-size: 12px !important;
      line-height: 1.3 !important;
    }

    .jexcel thead td {
      font-size: 11px !important;
      padding: 6px 4px !important;
      background: #37474f !important;
      color: #fff !important;
      text-shadow: none !important;
    }

    .excel-tab {
      padding: 6px 10px !important;
      font-size: 11px !important;
    }
  }

  /* === 접속자 배지 & 패널 === */
  #onlineBadge {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 102;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border: 2px solid #1b5e20;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
  }

  #onlineBadge:hover {
    background: #388e3c;
    transform: scale(1.05);
  }

  #onlineBadge:active {
    transform: scale(0.95);
  }

  #onlineCount {
    font-weight: bold;
    min-width: 12px;
    text-align: center;
  }

  .online-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1999;
  }

  .online-overlay.active {
    display: block;
  }

  .online-panel {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--panel-color);
    border-right: 4px solid var(--border-color);
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .online-panel.active {
    left: 0;
  }

  .online-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(93, 64, 55, 0.95);
    color: #fff8e1;
    font-size: 16px;
    border-bottom: 3px solid var(--border-color);
    text-shadow: 2px 2px 0 #000;
  }

  .online-panel-close {
    cursor: pointer;
    font-size: 20px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff8e1;
    border-radius: 4px;
    transition: background 0.2s;
  }

  .online-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .online-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
  }

  .online-list::-webkit-scrollbar {
    width: 8px;
  }

  .online-list::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
  }

  .online-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 2px dashed #d7ccc8;
    font-size: 14px;
  }

  .online-item:last-child {
    border-bottom: none;
  }

  .online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
  }

  @keyframes pulse-dot {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.5;
    }
  }

  .online-name {
    font-weight: bold;
    color: var(--text-color);
  }

  .online-ip {
    font-size: 11px;
    color: var(--secondary-color);
    margin-left: auto;
  }

  .online-guest {
    color: #9e9e9e;
    font-style: italic;
  }

  /* === 23. 모바일 레이아웃 조정 (Mobile Layout Adjustments) === */
  @media (max-width: 768px) {
    .main-layout-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      /* 중앙 정렬 */
      width: 100%;
    }

    /* 공통: 모바일에서 가로 꽉 채우기 & 간격 좁히기 */
    .main-notice-wrapper,
    .home-feed-wrapper,
    .container {
      max-width: 100% !important;
      width: 100% !important;
      margin: 5px 0 !important;
      /* 위아래 간격 5px로 축소, 좌우 0 */
      padding: 0 4px !important;
      /* 좌우 패딩 최소화 */
      box-sizing: border-box;
    }

    /* 채팅 박스 Wrapper (home-feed-wrapper 클래스 사용 중이므로 위 규칙 적용됨 - 추가 보정) */
    #chatWrapper {
      margin-bottom: 5px !important;
      /* 기존 25px -> 5px */
    }

    /* 기본 순서 */
    .main-notice-wrapper {
      order: 1;
    }

    #homeFeedWrapper {
      order: 2;
    }

    #chatWrapper {
      order: 3;
    }

    .container {
      order: 5;
    }

    /* 달력 */

    /* 미니홈피: 맨 아래로, 둥근 모서리 제거, 꽉 채우기 */
    #minihp-container {
      order: 4;
      max-width: 100% !important;
      width: 100% !important;
      margin: 20px 0 0 0 !important;
      padding: 0 !important;
      text-align: center;
      position: relative;
      z-index: 1;
      overflow: hidden;
    }

    #minihp-overlay {
      display: flex !important;
      touch-action: pan-y !important;
      /* 세로 스크롤 통과 허용 */
    }

    #minihp-overlay #minihp-hint {
      font-size: 12px;
      padding: 6px 14px;
      max-width: 80%;
      text-align: center;
      line-height: 1.4;
    }

    #minihp-frame {
      width: 100% !important;
      height: 85vh !important;
      min-height: 500px;
      max-height: 750px;
      border: none !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      background: #fff;
      position: relative;
      z-index: 1;
      pointer-events: none;
      /* ★ 추가: 기본적으로 터치 차단, JS에서 활성화 */
    }

    /* ★ 활성 상태일 때 iframe 테두리 표시 */
    #minihp-frame.active-mode {
      pointer-events: auto;
      box-shadow: inset 0 0 0 3px rgba(108, 155, 207, 0.5) !important;
    }
  }

  /* @media (max-width: 768px) 닫기 */

  /* === 24. 실시간 날씨 효과 (Weather Effects) === */
  #weather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 95;
    /* nav-bar(100)보다 낮게 조정하여 클릭 간섭 방지 */
    overflow: hidden;
  }

  #btn-weather.active {
    background: #1b5e20;
    border-color: #66bb6a;
    box-shadow: 0 0 6px rgba(102, 187, 106, 0.5);
  }

  /* --- 비 효과 --- */
  .rain-drop {
    position: absolute;
    top: -20px;
    width: 2px;
    height: 18px;
    background: linear-gradient(to bottom, transparent, rgba(174, 194, 224, 0.6));
    border-radius: 0 0 2px 2px;
    animation: rainFall linear infinite;
  }

  @keyframes rainFall {
    0% {
      transform: translateY(-20px);
      opacity: 0;
    }

    10% {
      opacity: 1;
    }

    90% {
      opacity: 0.7;
    }

    100% {
      transform: translateY(100vh);
      opacity: 0;
    }
  }

  /* --- 눈 효과 --- */
  .snow-flake {
    position: absolute;
    top: -10px;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    animation: snowFall linear infinite;
  }

  @keyframes snowFall {
    0% {
      transform: translateY(-10px) translateX(0) rotate(0deg);
      opacity: 0;
    }

    10% {
      opacity: 0.9;
    }

    50% {
      transform: translateY(50vh) translateX(30px) rotate(180deg);
    }

    100% {
      transform: translateY(100vh) translateX(-20px) rotate(360deg);
      opacity: 0.2;
    }
  }

  /* --- 번개 효과 --- */
  .lightning-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    pointer-events: none;
    z-index: 9994;
    animation: lightning 0.3s ease-out;
  }

  @keyframes lightning {
    0% {
      background: rgba(255, 255, 255, 0);
    }

    10% {
      background: rgba(255, 255, 255, 0.6);
    }

    20% {
      background: rgba(255, 255, 255, 0.1);
    }

    30% {
      background: rgba(255, 255, 255, 0.5);
    }

    50% {
      background: rgba(255, 255, 255, 0.05);
    }

    100% {
      background: rgba(255, 255, 255, 0);
    }
  }

  /* --- 안개 효과 --- */
  .fog-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: -50%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 80%,
        transparent 100%);
    animation: fogDrift 30s linear infinite;
    /* 기본 지속 시간 추가 */
  }

  @keyframes fogDrift {
    0% {
      transform: translateX(-25%);
    }

    100% {
      transform: translateX(25%);
    }
  }

  /* 구름 효과 */
  .weather-cloud {
    position: absolute;
    width: 200px;
    height: 60px;
    background: radial-gradient(ellipse at center, rgba(200, 200, 210, 0.6) 0%, rgba(180, 180, 195, 0.3) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    animation: cloudDrift linear infinite;
    pointer-events: none;
  }

  .weather-cloud::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 30px;
    width: 100px;
    height: 50px;
    background: radial-gradient(ellipse at center, rgba(200, 200, 210, 0.5) 0%, transparent 70%);
    border-radius: 50%;
  }

  .weather-cloud::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 80px;
    width: 80px;
    height: 45px;
    background: radial-gradient(ellipse at center, rgba(190, 190, 205, 0.5) 0%, transparent 70%);
    border-radius: 50%;
  }

  @keyframes cloudDrift {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(calc(100vw + 100%)); }
  }

  /* 이슬비 효과 */
  .drizzle-drop {
    position: absolute;
    top: -10px;
    width: 1px;
    height: 8px;
    background: linear-gradient(to bottom, transparent, rgba(174, 194, 224, 0.4));
    border-radius: 0 0 1px 1px;
    animation: drizzleFall linear infinite;
  }

  @keyframes drizzleFall {
    0% {
      transform: translateY(-10px) translateX(0px);
      opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% {
      transform: translateY(100vh) translateX(15px);
      opacity: 0;
    }
  }

  /* PC용 미니홈피 기본 스타일 */
  #minihp-container {
    max-width: 920px;
    margin: 20px auto;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
  }

  #minihp-frame {
    width: 100%;
    height: 560px;
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: transparent;
  }

  .swal-behind-pet {
    z-index: 9998 !important;
  }

  /* === 끝말잇기 대결 시스템 (Word Battle) === */

  /* 모래시계 대기 애니메이션 */
  .battle-hourglass {
    position: absolute;
    font-size: 22px;
    z-index: 10004;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.6));
    animation: hourglassSpin 1.5s ease-in-out infinite;
  }

  @keyframes hourglassSpin {
    0% {
      transform: translateX(-50%) rotate(0deg);
    }

    50% {
      transform: translateX(-50%) rotate(180deg);
    }

    100% {
      transform: translateX(-50%) rotate(360deg);
    }
  }

  /* 전체 대결 오버레이 */
  .battle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'DungGeunMo', monospace;
    color: #fff;
  }

  .battle-popup {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    width: 92%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.1);
    padding: 10px 0;
  }

  .battle-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    border-radius: 16px;
  }

  /* 대결 헤더: 양쪽 펫 */
  .battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 420px;
    padding: 15px 20px;
    position: relative;
    z-index: 1;
  }

  .battle-pet {
    text-align: center;
    flex: 1;
    padding: 10px;
  }

  .battle-pet-avatar {
    font-size: 48px;
    display: block;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  }

  .battle-pet-avatar img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: pixelated;
  }

  .battle-pet-name {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    margin: 0 auto;
  }

  .battle-pet-owner {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 2px;
  }

  .battle-pet-active .battle-pet-avatar {
    animation: petGlow 0.8s ease-in-out infinite alternate;
  }

  @keyframes petGlow {
    from {
      filter: drop-shadow(0 0 5px rgba(255, 200, 0, 0.3));
    }

    to {
      filter: drop-shadow(0 0 15px rgba(255, 200, 0, 0.8));
    }
  }

  .battle-vs {
    font-size: 28px;
    color: #ff4081;
    text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255, 64, 129, 0.5);
    flex-shrink: 0;
    padding: 0 5px;
  }

  /* 타이머 바 */
  .battle-timer-bar {
    width: 90%;
    max-width: 380px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin: 6px auto;
    position: relative;
    z-index: 1;
  }

  .battle-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #fbc02d, #ff4081);
    border-radius: 4px;
    transition: width 0.1s linear;
  }

  .battle-timer-fill.warning {
    background: linear-gradient(90deg, #ff4081, #f44336) !important;
    animation: timerPulse 0.5s ease-in-out infinite;
  }

  @keyframes timerPulse {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.5;
    }
  }

  .battle-timer-text {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    margin: 2px 0;
    position: relative;
    z-index: 1;
  }

  /* 현재 단어 표시 */
  .battle-current-word {
    font-size: 32px;
    color: #fbc02d;
    text-shadow: 3px 3px 0 #000;
    margin: 8px 0 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
  }

  .battle-last-char {
    color: #ff4081;
    font-size: 20px;
    margin-top: 2px;
    position: relative;
    z-index: 1;
  }

  /* 턴 표시 */
  .battle-turn-indicator {
    font-size: 13px;
    padding: 3px 12px;
    border-radius: 12px;
    margin: 4px 0;
    position: relative;
    z-index: 1;
  }

  .battle-my-turn {
    background: rgba(102, 187, 106, 0.25);
    color: #66bb6a;
    border: 1px solid #66bb6a;
  }

  .battle-opponent-turn {
    background: rgba(255, 64, 129, 0.25);
    color: #ff4081;
    border: 1px solid #ff4081;
  }

  /* 단어 히스토리 (채팅식) */
  .battle-words {
    width: 90%;
    max-width: 400px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
    min-height: 80px;
  }

  .battle-words::-webkit-scrollbar {
    width: 6px;
  }

  .battle-words::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  .battle-word-bubble {
    max-width: 70%;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 16px;
    animation: bubbleAppear 0.3s ease-out;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    word-break: keep-all;
  }

  .battle-word-left {
    align-self: flex-start;
    background: #29b6f6;
    color: #fff;
    border-bottom-left-radius: 4px;
  }

  .battle-word-right {
    align-self: flex-end;
    background: #ff4081;
    color: #fff;
    border-bottom-right-radius: 4px;
  }

  @keyframes bubbleAppear {
    from {
      transform: scale(0.5);
      opacity: 0;
    }

    to {
      transform: scale(1);
      opacity: 1;
    }
  }

  /* 입력 영역 */
  .battle-input-area {
    width: 100%;
    max-width: 420px;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
    box-sizing: border-box;
  }

  .battle-input {
    flex: 1;
    padding: 10px 14px;
    font-family: 'DungGeunMo', monospace;
    font-size: 18px;
    border: 3px solid #5d4037;
    border-radius: 8px;
    background: #fff;
    color: #3e2723;
  }

  .battle-input:focus {
    outline: none;
    border-color: #ff9800;
    background: #fffbf0;
  }

  .battle-input:disabled {
    background: #555;
    color: #999;
    border-color: #444;
  }

  .battle-submit-btn {
    padding: 10px 16px;
    background: #ff9800;
    color: #fff;
    border: 3px solid #000;
    border-radius: 8px;
    font-family: 'DungGeunMo', monospace;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    white-space: nowrap;
  }

  .battle-submit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  }

  .battle-submit-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
  }

  /* 주사위 애니메이션 */
  .battle-dice-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    position: relative;
    z-index: 1;
  }

  .battle-dice-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 20px 0;
  }

  .battle-dice {
    font-size: 56px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.1s;
  }

  .battle-dice.rolling {
    animation: diceShake 0.1s steps(1) infinite;
  }

  @keyframes diceShake {
    0% {
      transform: rotate(0deg) scale(1);
    }

    25% {
      transform: rotate(10deg) scale(1.1);
    }

    50% {
      transform: rotate(-10deg) scale(0.9);
    }

    75% {
      transform: rotate(5deg) scale(1.05);
    }
  }

  .battle-dice-label {
    font-size: 14px;
    color: #aaa;
    margin-top: 6px;
    text-align: center;
  }

  /* 결과 화면 */
  .battle-result {
    text-align: center;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
  }

  .battle-result-icon {
    font-size: 60px;
    margin-bottom: 10px;
    animation: resultBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes resultBounce {
    0% {
      transform: scale(0);
    }

    70% {
      transform: scale(1.2);
    }

    100% {
      transform: scale(1);
    }
  }

  .battle-result-title {
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 #000;
  }

  .battle-result-title.win {
    color: #fbc02d;
  }

  .battle-result-title.lose {
    color: #999;
  }

  .battle-result-reason {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
  }

  .battle-result-stats {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .battle-result-close {
    padding: 12px 30px;
    background: #ff9800;
    color: #fff;
    border: 3px solid #000;
    border-radius: 8px;
    font-family: 'DungGeunMo', monospace;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  }

  .battle-result-close:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  }

  /* 방문 펫 팝업 버튼 스타일 */
  .walk-pet-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 6px;
    border: 3px solid #000;
    border-radius: 8px;
    font-family: 'DungGeunMo', monospace;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3), 3px 3px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
  }

  .walk-pet-btn:active {
    transform: translate(2px, 2px);
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.2);
  }

  .walk-pet-btn-guestbook {
    background: #ff9800;
  }

  .walk-pet-btn-like {
    background: #e91e63;
  }

  .walk-pet-btn-battle {
    background: #7c4dff;
  }

  .walk-pet-btn-pray {
    background: #7c3aed;
  }

  .walk-pet-btn-close {
    background: #8d6e63;
  }

  /* 확인 중 로딩 */
  .battle-validating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fbc02d;
    font-size: 14px;
    margin: 4px 0;
    position: relative;
    z-index: 1;
  }

  .battle-validating .spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-top-color: #fbc02d;
  }

  /* 이의제기 버튼 */
  .battle-objection-btn {
    background: #5d4037;
    color: #fff;
    border: 2px solid #000;
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    font-family: 'DungGeunMo', monospace;
    margin-bottom: 5px;
  }

  .battle-objection-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
  }

  /* 일시정지 오버레이 및 채팅 */
  .battle-pause-overlay {
    background: rgba(0, 0, 0, 0.85);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 12px;
  }

  .battle-pause-header {
    text-align: center;
    margin-bottom: 15px;
  }

  .battle-chat-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 10px;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .battle-message-row {
    display: flex;
    width: 100%;
  }

  .msg-me {
    justify-content: flex-end;
  }

  .msg-other {
    justify-content: flex-start;
  }

  .msg-bubble {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    max-width: 80%;
  }

  .msg-me .msg-bubble {
    background: #7c4dff;
    color: #fff;
  }

  .msg-other .msg-bubble {
    background: #444;
    color: #eee;
  }

  .battle-chat-input-row {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
  }

  .battle-chat-input-row input {
    flex: 1;
    background: #222;
    border: 2px solid #444;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    width: auto;
    /* 중복 방지 */
  }

  .battle-chat-input-row button {
    background: #ff9800;
    border: 2px solid #000;
    padding: 0 15px;
    border-radius: 4px;
    font-family: 'DungGeunMo';
    cursor: pointer;
    width: auto;
  }

  .battle-pause-actions {
    display: flex;
    gap: 10px;
  }

  .battle-pause-actions button {
    flex: 1;
    padding: 10px;
    border: 3px solid #000;
    border-radius: 8px;
    font-family: 'DungGeunMo';
    font-size: 14px;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  }

  .btn-resume {
    background: #4caf50;
    color: #fff;
  }

  .btn-admit {
    background: #f44336;
    color: #fff;
  }

  .battle-pause-actions button:active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }

  /* 모바일 반응형 */
  @media (max-width: 480px) {
    .battle-pet-avatar {
      font-size: 40px;
    }

    .battle-pet-avatar img {
      width: 44px;
      height: 44px;
    }

    .battle-vs {
      font-size: 22px;
    }

    .battle-current-word {
      font-size: 26px;
    }

    .battle-input {
      font-size: 16px;
      padding: 8px 10px;
    }

    .battle-submit-btn {
      font-size: 14px;
      padding: 8px 12px;
    }

    .battle-dice {
      font-size: 44px;
    }

    .battle-result-title {
      font-size: 26px;
    }
  }

  /* ============================================
     상점 (Shop) 시스템
     ============================================ */
  .shop-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: #fdf6e3;
    overflow-y: auto;
  }
  .shop-header {
    background: linear-gradient(135deg, #5d4037, #8d6e63);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid #3e2723;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .shop-header h1 { font-size: 20px; margin: 0; border: none; }
  .shop-back-btn {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 5px 12px;
    font-family: 'DungGeunMo', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
  }
  .shop-back-btn:hover { background: rgba(255,255,255,0.2); }
  .shop-points-badge {
    background: #fff3e0;
    color: #e65100;
    padding: 5px 12px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #e65100;
  }
  .shop-tab-container {
    display: flex;
    border-bottom: 3px solid #5d4037;
    background: #efebe9;
  }
  .shop-tab-btn {
    flex: 1;
    padding: 12px;
    font-family: 'DungGeunMo', monospace;
    font-size: 15px;
    border: none;
    background: none;
    cursor: pointer;
    color: #8d6e63;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all 0.2s;
  }
  .shop-tab-btn.active {
    color: #5d4037;
    border-bottom-color: #e65100;
    background: #fdf6e3;
    font-weight: bold;
  }
  .shop-tab-btn:hover { background: #fdf6e3; }
  .shop-tab-content { display: none; padding: 15px; }
  .shop-tab-content.active { display: block; }
  .shop-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
  }
  .shop-product-card {
    background: white;
    border: 3px solid #5d4037;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
  }
  .shop-product-card.completed .shop-img-wrap,
  .shop-product-card.soldout .shop-img-wrap {
    filter: grayscale(1);
  }
  .shop-img-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .shop-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
  }
  .shop-no-img { font-size: 60px; color: #ccc; }
  .shop-status-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
  }
  .shop-status-badge {
    padding: 15px 30px;
    font-size: 28px;
    font-weight: bold;
    font-family: 'DungGeunMo', monospace;
    border-radius: 10px;
    transform: rotate(-15deg);
    border: 4px solid;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  }
  .shop-status-badge.success {
    background: rgba(46,125,50,0.9);
    color: white;
    border-color: #1b5e20;
    animation: shopBadgePop 0.5s ease-out;
  }
  .shop-status-badge.soldout {
    background: rgba(198,40,40,0.9);
    color: white;
    border-color: #b71c1c;
  }
  @keyframes shopBadgePop {
    0% { transform: rotate(-15deg) scale(0); opacity: 0; }
    60% { transform: rotate(-15deg) scale(1.2); }
    100% { transform: rotate(-15deg) scale(1); opacity: 1; }
  }
  .shop-product-info { padding: 12px 15px; }
  .shop-product-name { font-size: 18px; font-weight: bold; margin-bottom: 5px; }
  .shop-product-desc { font-size: 13px; color: #666; margin-bottom: 8px; line-height: 1.4; }
  .shop-product-price { font-size: 20px; color: #e65100; font-weight: bold; }
  .shop-progress-section { margin: 10px 0; }
  .shop-progress-bar-wrap {
    background: #e0e0e0;
    border-radius: 10px;
    height: 24px;
    overflow: hidden;
    border: 2px solid #5d4037;
    position: relative;
  }
  .shop-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8f00, #e65100);
    border-radius: 8px;
    transition: width 0.5s ease;
    min-width: 0%;
  }
  .shop-progress-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #3e2723;
    text-shadow: 0 0 3px white;
  }
  .shop-stock-info {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    margin: 5px 0;
  }
  .shop-stock-info.available { background: #e8f5e9; color: #2e7d32; }
  .shop-stock-info.low { background: #fff3e0; color: #e65100; }
  .shop-stock-info.out { background: #ffebee; color: #c62828; }
  .shop-contrib-log {
    max-height: 150px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    margin: 8px 0;
    padding: 8px;
    background: #fafafa;
    font-size: 12px;
  }
  .shop-contrib-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dashed #e0e0e0;
  }
  .shop-contrib-item:last-child { border-bottom: none; }
  .shop-contrib-name { color: #5d4037; font-weight: bold; }
  .shop-contrib-amount { color: #e65100; }
  .shop-buyers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
  }
  .shop-buyer-chip {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid #a5d6a7;
  }
  .shop-btn {
    font-family: 'DungGeunMo', monospace;
    padding: 10px 20px;
    font-size: 14px;
    border: 3px solid #3e2723;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.1s;
    width: 100%;
    margin-top: 8px;
  }
  .shop-btn:active { transform: translateY(2px); }
  .shop-btn.contribute { background: #ff8f00; color: white; }
  .shop-btn.contribute:hover { background: #e65100; }
  .shop-btn.purchase { background: #2e7d32; color: white; }
  .shop-btn.purchase:hover { background: #1b5e20; }
  .shop-btn:disabled {
    background: #bdbdbd !important;
    color: #757575 !important;
    border-color: #9e9e9e !important;
    cursor: not-allowed;
  }
  .shop-admin-panel {
    display: none;
    background: #fff3e0;
    border: 3px solid #e65100;
    border-radius: 8px;
    padding: 15px;
    margin: 15px auto;
    max-width: 600px;
  }
  .shop-admin-panel h3 {
    color: #e65100;
    margin-bottom: 10px;
    font-size: 16px;
    border: none;
  }
  .shop-admin-panel label {
    display: block;
    margin: 8px 0 3px;
    font-size: 13px;
    color: #5d4037;
  }
  .shop-admin-panel input,
  .shop-admin-panel select,
  .shop-admin-panel textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #8d6e63;
    border-radius: 4px;
    font-family: 'DungGeunMo', monospace;
    font-size: 13px;
    background: white;
  }
  .shop-admin-panel textarea { height: 60px; resize: vertical; }
  .shop-img-preview {
    max-width: 200px;
    max-height: 150px;
    margin: 8px 0;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: none;
  }
  .shop-history-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .shop-history-card img {
    width: 50px; height: 50px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ccc;
  }
  .shop-history-info { flex: 1; }
  .shop-history-info .h-name { font-weight: bold; font-size: 14px; }
  .shop-history-info .h-detail { font-size: 12px; color: #888; }
  .shop-history-info .h-amount { color: #e65100; font-weight: bold; }
  .shop-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #bdbdbd;
  }
  .shop-empty-state .emoji { font-size: 48px; margin-bottom: 10px; }
  .shop-loading {
    text-align: center;
    padding: 40px;
    color: #8d6e63;
  }
  .shop-loading::after {
    content: '';
    display: inline-block;
    width: 20px; height: 20px;
    border: 3px solid #8d6e63;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
  }
  .shop-admin-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
  }
  .shop-admin-product-item img {
    width: 40px; height: 40px;
    object-fit: cover;
    border-radius: 4px;
  }
  .shop-admin-product-item .info { flex: 1; font-size: 13px; }
  .shop-admin-del-btn {
    background: #c62828;
    color: white;
    border: 2px solid #b71c1c;
    padding: 4px 10px;
    font-family: 'DungGeunMo', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
  }
  .shop-admin-toggle-wrap {
    text-align: center;
    padding: 8px;
    display: none;
  }
