/* ============================================================
   semojjal.com 2026 redesign  (jiraksil.com design concept)
   - loaded AFTER semojjal.css : overrides legacy styles
   ============================================================ */

/* ---------- 0. Base ---------- */
html, body, * {
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Nanum Gothic",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  position: relative;
  color: #212529;
}

a { color: #555; text-decoration: none; }
a:hover { text-decoration: none; }

.cpointer { cursor: pointer; }
.rowclear { clear: both; }
.image-blur { filter: blur(9px); }

/* ---------- 1. Animated gradient background ---------- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #8a929a 0%, #aab2ba 50%, #ced4da 100%);
  background-size: 300% 300%;
  animation: gradientShift 25s ease infinite;
  z-index: -2;
  pointer-events: none;
}

/* ---------- 2. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 6px;
  height: 56px;
  gap: 12px;
  position: relative;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.header-logo-img:hover { transform: scale(1.05); }

.header-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #101b4d;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* PC search (in header) */
.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 340px;
  height: 40px;
  background: #f3f4f6;
  border: 1.5px solid transparent;
  border-radius: 20px;
  padding: 0 5px 0 14px;
  transition: all 0.25s ease;
}

.header-search:focus-within {
  background: #fff;
  border-color: #ccc;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.header-search-icon {
  flex-shrink: 0;
  font-size: 13px;
  color: #aaa;
  margin-right: 8px;
  transition: color 0.2s;
}

.header-search:focus-within .header-search-icon { color: #555; }

.header-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: #222;
  padding: 0;
  min-width: 0;
  box-shadow: none;
}

.header-search-input:focus { outline: none; box-shadow: none; }
.header-search-input::placeholder { color: #bbb; font-weight: 400; }

.header-search-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-search-btn:hover { background: #444; transform: scale(1.05); }

/* mobile search toggle */
.header-search-toggle {
  display: none;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-search-toggle:hover { background: #e8e8e8; color: #222; }

/* header nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-nav-link:hover { background: #f0f0f0; color: #222; }

.header-login-btn { background: #222; color: #fff; }
.header-login-btn:hover { background: #444; color: #fff; }

.header-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
}

.header-nav-user span { overflow: hidden; text-overflow: ellipsis; }
.header-nav-user i { flex-shrink: 0; font-size: 14px; color: #888; }
.header-nav-user:hover { background: #eaeaea; color: #111; }

/* mobile full-width search (slide down) */
.header-search-mobile {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  z-index: 200;
  padding: 0 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  animation: searchSlideDown 0.2s ease;
}

.header-search-mobile.active { display: flex; align-items: center; }

@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header-search-mobile-inner {
  display: flex;
  align-items: center;
  flex: 1;
  height: 42px;
  background: #f3f4f6;
  border-radius: 21px;
  padding: 0 6px 0 14px;
}

.header-search-mobile-inner:focus-within {
  background: #fff;
  border: 1.5px solid #ccc;
}

.header-search-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #888;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-search-close:hover { background: #eee; color: #333; }

/* header responsive */
@media (max-width: 640px) {
  .header-inner { padding: 0 10px; height: 50px; gap: 8px; }
  .header-logo-img { width: 34px; height: 34px; }
  .header-logo-text { font-size: 15px; }
  .header-search { display: none; }
  .header-search-toggle { display: flex; }
  .header-nav { gap: 3px; }
  .header-nav-link { padding: 5px 10px; font-size: 12px; }
  .header-nav-user { padding: 4px 9px; font-size: 12px; max-width: 80px; }
  .header-search-mobile { height: 50px; }
}

@media (min-width: 641px) and (max-width: 768px) {
  .header-search { max-width: 240px; }
}

/* ---------- 2.5 Top nav menu (jiraksil style) ---------- */
.nav-menu { max-width: 100%; margin: 0 auto; padding: 0; }

.nav-menu-inner {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-top: 11px;
  padding: 2px;
}

.nav-menu-scroll {
  display: flex;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-menu-scroll::-webkit-scrollbar { display: none; }

.nav-menu-item {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #777;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-menu-item:hover { color: #222; background: #f8f8f8; }
.nav-menu-item.active { color: #222; }

.nav-menu-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #222;
  border-radius: 3px;
}

.nav-menu-more {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: none;
  background: none;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.nav-menu-more:hover { background: #f5f5f5; color: #333; }

/* tag scroll row */
.nav-tags { position: relative; margin-top: 10px; overflow: hidden; }

.nav-tags-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0 6px;
  /* PC 드래그 스크롤 */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.nav-tags-scroll:active { cursor: grabbing; }
.nav-tags-scroll.dragging { scroll-behavior: auto; }
.nav-tags-scroll::-webkit-scrollbar { display: none; }

.nav-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.85);
  color: #666;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.nav-tag:hover { background: #fff; color: #333; transform: translateY(-1px); }

.nav-tag.active {
  background: #222;
  color: #fff;
  font-weight: 600;
  border-color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* fullmenu overlay */
.fullmenu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  animation: overlayFadeIn 0.2s ease;
}

.fullmenu-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
}

@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }

.fullmenu-panel {
  width: 92%;
  max-width: 520px;
  max-height: 75vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: panelSlideUp 0.25s ease;
}

@keyframes panelSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.fullmenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.fullmenu-title { font-size: 16px; font-weight: 700; color: #222; }

.fullmenu-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #888;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fullmenu-close:hover { background: #e8e8e8; color: #333; }

.fullmenu-body { overflow-y: auto; max-height: calc(75vh - 66px); padding: 12px; }

.fullmenu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.fullmenu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 12px;
  background: #f8f9fa;
  color: #555;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.fullmenu-item:hover { background: #eef0f2; color: #222; transform: translateY(-1px); }

.fullmenu-item.active {
  background: #222;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.fullmenu-tags { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f0f0; }

.fullmenu-tags-label {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.fullmenu-tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fullmenu-tags-list .nav-tag { background: #f3f4f6; }

@media (max-width: 640px) {
  .nav-menu-inner { border-radius: 12px; margin-top: 9px; padding: 2px; }
  .nav-menu-item { height: 42px; padding: 0 12px; font-size: 12.5px; }
  .nav-menu-item.active::after { width: 16px; height: 2.5px; }
  .nav-menu-more { width: 42px; height: 42px; }
  .nav-tag { padding: 5px 12px; font-size: 12px; }
}

/* ---------- 3. Item list grid & cards ---------- */
.item_list,
.item_top_list {
  padding-top: 12px;
  margin-left: 0;
  margin-right: 0;
}

.item_list::after,
.item_top_list::after {
  content: '';
  display: block;
  clear: both;
}

#jjal_list,
.recent-jjal-grid,
.home-jjalbox-grid,
.home-channel-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

.home-jjalbox-section {
  margin-top: 14px;
}

.home-recent-jjal {
  margin-top: 12px;
  margin-bottom: 14px;
}

.recent-jjal-status {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  margin: 8px 0 12px;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.home-section-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-section-heading .list_top_title {
  width: auto;
  flex: 1 1 auto;
}

.home-title-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 3px 6px 9px;
  border: 0;
  background: transparent;
  color: #777;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.home-title-more:hover {
  color: #222;
  text-decoration: none;
}

.home-title-more i {
  font-size: 10px;
}

.home-title-wait {
  width: 14px;
  height: 14px;
}

.home-content-section {
  margin: 10px 0 14px;
}

.home-newword-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 6px;
}

.home-newword-card {
  min-width: 0;
}

.home-newword-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 158px;
  padding: 16px;
  border: 1px solid #e9e6f0;
  border-radius: 16px;
  background: #fff;
  color: #282536;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(33, 24, 56, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-newword-link:hover {
  color: #282536;
  text-decoration: none;
  transform: translateY(-3px);
  border-color: #cdb8f4;
  box-shadow: 0 10px 24px rgba(74, 42, 126, 0.11);
}

.home-newword-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-newword-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.home-newword-head span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2ebff;
  color: #5b21c8;
  font-size: 10px;
  font-weight: 700;
}

.home-newword-link p {
  margin: 14px 0 0;
  color: #68677a;
  font-size: 12px;
  line-height: 1.55;
  word-break: keep-all;
}

@media (max-width: 640px) {
  .home-newword-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
  }

  .home-newword-link {
    min-height: 148px;
    padding: 13px;
  }

  .home-newword-head {
    display: block;
  }

  .home-newword-head h3 {
    font-size: 17px;
    margin-bottom: 7px;
  }
}

.recent-jjal-page {
  min-height: 700px;
}

.answer_shadow.recent-jjal-guide {
  margin: 6px 4px 20px;
}

@media (max-width: 640px) {
  .answer_shadow.recent-jjal-guide {
    margin: 4px 2px 16px;
  }
}

.recent-jjal-wait {
  width: 18px;
  height: 18px;
}

.recent-jjal-retry {
  display: block;
  margin: 0 auto 14px;
}

.recent-jjal-retry[hidden] {
  display: none;
}

.recent-jjal-sentinel {
  width: 100%;
  height: 1px;
}

.list_top_title {
  width: 100%;
  padding: 10px 2px;
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: 1.15em;
  font-weight: 700;
  color: #2b3035;
}

.sub_menu_btn {
  float: left; /* fallback for non-flex containers; ignored inside #jjal_list flex */
  max-width: 100%;
  height: auto;
  padding: 6px;
  text-align: center;
  font-size: 1em;
}

.sub_btn_box {
  position: relative;
  width: 100%;
  height: auto;
  margin: 0;
  background-color: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: bold;
}

.sub_btn_box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.box_wlg { width: 100%; padding: 0; display: inline-block; }
.box_lg { height: 206px; }
.box_lg2 { height: 220px; }
.box_md { height: 150px; }

.main_list_image {
  width: 100%;
  height: 132px;
  border: none;
  border-radius: 0;
  margin: 0 auto;
  object-fit: cover;
  overflow: hidden;
  display: block;
  background: #eceef0;
}

.sub_menu_box_title {
  margin-top: 0;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-align: left;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* badge chips over the thumbnail */
.list_good_icon,
.list_count_icon,
.list_update_icon,
.list_nickname_icon,
.list_ch_icon,
.list_box_icon,
.list_hubang_icon {
  position: absolute;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  height: auto;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 30px;
  background: rgba(15, 17, 21, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 46%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.list_good_icon     { top: 102px; right: 7px; }
.list_count_icon    { top: 102px; left: 7px; }
.channel-jjal-count { top: 7px; right: 7px; left: auto; max-width: 55%; }
.list_nickname_icon { top: 102px; left: 7px; }
.list_update_icon   { top: 7px; right: 7px; }
.list_ch_icon       { top: 7px; left: 7px; background: rgba(13, 110, 253, 0.85); }
.list_box_icon      { top: 7px; left: 7px; background: rgba(91, 55, 170, 0.85); }
.list_box_icon + .list_hubang_icon { left: 54px; }
.list_hubang_icon   { top: 7px; left: 7px; background: rgba(220, 53, 69, 0.9); }

.jjalbox-list-page {
  min-height: 700px;
}

.answer_shadow.jjalbox-list-guide {
  margin: 6px 4px 20px;
}

.jjalbox-sort-buttons {
  margin-bottom: 0;
  padding-top: 0;
}

@media (max-width: 640px) {
  .answer_shadow.jjalbox-list-guide {
    margin: 4px 2px 16px;
  }
}

.jjalbox-list-more {
  margin: 2px auto 18px;
}

.jjalbox-list-more[hidden] {
  display: none;
}

/* new / hot labels (kept for compatibility) */
.label-container {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: row;
}

.new-label,
.new-label-title {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #00bfff;
  color: #fff;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 0.75em;
  font-weight: 700;
  margin: 3px 4px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.best-label,
.best-label-title {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #ff6600;
  color: #fff;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 0.75em;
  font-weight: 700;
  margin: 3px 4px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cat-label-title {
  background-color: #fff;
  color: #222;
  border-radius: 30px;
  font-weight: 700;
  padding: 5px 12px;
  font-size: 0.95em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ---------- 4. Sort pill buttons ---------- */
.list_top_btn {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 4px 10px;
}

.btn_sort {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn_sort_color1 {
  background: #ffffff;
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn_sort_color1:hover {
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.btn_sort_color2 {
  background: #222;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .btn_sort { padding: 6px 13px; font-size: 12.5px; }
}

/* ---------- 5. More button ---------- */
.more_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 140px;
  border: none;
  padding: 12px 30px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.more_btn:hover {
  background: #222;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- 6. Content cards ---------- */
.answer_shadow {
  height: auto;
  margin: 0 auto;
  padding: 16px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.92);
  color: #333;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.top_info_box {
  max-width: 640px;
  border: none;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  height: auto;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* legacy header (still used by a few pages e.g. board) */
.top_box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 8px 14px;
  margin-top: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.top_box_menu { font-size: 13px; font-weight: 600; }
.top_box_logo_box_n { cursor: pointer; }
.title_logo_sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

/* legacy main search box */
.custom-input-group {
  margin-top: 12px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.custom-input-group .form-control {
  height: 46px;
  border: none;
  box-shadow: none;
  font-size: 14px;
}

.custom-input-group .input-group-btn .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  width: 52px;
  border: none;
  border-radius: 0;
  background: #222;
  color: #fff;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: 36px;
  margin-bottom: 30px;
  padding: 26px 16px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.site-footer-msg { padding: 14px 8px 4px; font-size: 13px; color: #555; font-weight: 600; }
.site-footer-sub { font-size: 12px; color: #999; line-height: 1.7; }
.site-footer-links { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.06); font-size: 12px; color: #888; }
.site-footer-links a { color: #777; padding: 0 4px; }
.site-footer-links a:hover { color: #222; }
.site-footer-copy { margin-top: 6px; font-size: 12px; color: #aaa; }

.sns_link2 { margin: 0; }
.sns_link2 span, .sns_link2 a { display: inline-block; }

.sns_link2 img {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  padding: 8px;
  margin: 0 3px;
  background: #f8f9fa;
  object-fit: contain;
  transition: all 0.2s ease;
}

.sns_link2 img:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  background: #fff;
}

/* ---------- 7.5 Detail page title bar (jjalplay etc.) ---------- */
/* the 0-height box made its 80px bottom margin collapse ABOVE the bar,
   creating a blank gap under the header; give the bar real height instead.
   original bar form kept — colors switched to the site's neutral charcoal tone */
.quiz_title_box {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: stretch;
  margin: 14px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.quiz_title {
  position: static;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  border-radius: 0;
  background-color: #2b3036;
  color: #fff;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backlist {
  position: static;
  top: auto;
  flex-shrink: 0;
  width: 40px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #17191d;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.backlist:hover { background-color: #000; }

/* 짤 상세보기(jjalview)의 타이틀바 — 리스트 페이지와 동일한 독립 바 */
.quiz_title_box_view {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: stretch;
  margin: 14px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.backlist_view {
  position: static;
  flex-shrink: 0;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 0;
  background-color: #17191d;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.backlist_view:hover { background-color: #000; }

.quiz_title_view {
  position: static;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  background-color: #2b3036;
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the main image stands on its own below the standalone title bar */
.answer_image_box,
.answer_image_box img {
  border-radius: 12px;
}

/* ---------- 7.6 Toast message (copy to clipboard etc.) ---------- */
.msg_center {
  display: none;
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 86%;
  padding: 12px 26px;
  z-index: 9999;
  overflow: hidden;
  background: rgba(20, 22, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: toastUp 0.25s ease;
}

@keyframes toastUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 8. Misc polish ---------- */
.modal-content { border-radius: 16px; border: none; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); }
.modal-header { border-bottom: 1px solid #f0f0f0; }

#_loading {
  position: fixed;
  left: 50%;
  top: 50%;
  margin-left: -32px;
  padding: 8px;
  border: none;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

input, textarea { caret-color: black !important; }
