﻿/* ==========================================================================
   Design System Variables & Base Resets
   ========================================================================== */
:root {
  --primary-color: #ff4b4b; /* Blind signature coral red */
  --primary-hover: #e03b3b;
  --secondary-color: #12b886; /* Fresh nutrition green */
  --secondary-hover: #0ca678;
  --bg-page: #f8f9fa; /* Sleek warm gray background */
  --bg-card: #ffffff;
  --border-color: #ececec; /* Subtle gray borders */
  --text-main: #222222;
  --text-sub: #495057;
  --text-muted: #868e96;
  
  --font-kor: 'Noto Sans KR', sans-serif;
  --font-eng: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;

  --badge-sky-bg: #e7f5ff;
  --badge-sky-fg: #1c7ed6;
  --badge-green-bg: #ebfbee;
  --badge-green-fg: #2b8a3e;
  --badge-mint-bg: #e6fcf5;
  --badge-mint-fg: #0ca678;
  --badge-cyan-bg: #e8f7ff;
  --badge-cyan-fg: #0c8599;
  --badge-amber-bg: #fff9db;
  --badge-amber-fg: #e67700;
  --badge-orange-bg: #fff4e6;
  --badge-orange-fg: #d9480f;
  --badge-violet-bg: #f3f0ff;
  --badge-violet-fg: #5f3dc4;
  --badge-pink-bg: #fff0f6;
  --badge-pink-fg: #c2255c;
  --badge-rose-bg: #fff0f0;
  --badge-rose-fg: var(--primary-color);
  --badge-workchat-bg: #f3f8dc;
  --badge-workchat-fg: #528c47;
  --badge-slate-bg: #f1f3f5;
  --badge-slate-fg: #495057;
}

/* 설치형 모바일 PWA에서만 일반 텍스트를 기기 시스템 글꼴로 표시 */
html.mobile-installed-app {
  --font-kor: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Noto Sans KR";
  --font-eng: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Noto Sans KR";
}

/* 로고·브랜드 워드마크는 기존 전용 글꼴 유지 */
html.mobile-installed-app .logo-text,
html.mobile-installed-app .sidebar-logo,
html.mobile-installed-app .footer-logo {
  font-family: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-kor);
  color: var(--text-main);
  background-color: var(--bg-page);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
  outline: none;
}

.seo-site-title,
.seo-site-lead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Top Sub-Header (Tiny upper link bar)
   ========================================================================== */
.top-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  height: 36px;
  display: flex;
  align-items: center;
}

.top-bar-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
}

.top-bar-brand-title {
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
}

.top-bar-link:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   Main Header Section
   ========================================================================== */
#main-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  height: 60px;
  display: flex;
  align-items: center;
  overflow: visible;
  transition: var(--transition-fast);
}

.header-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-app-rail {
  display: none !important;
}

@media (min-width: 769px) {
  body {
    padding-left: 76px;
  }

  #desktop-app-rail.desktop-app-rail {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 76px;
    max-width: 76px;
    min-width: 76px;
    height: 100vh;
    padding: 64px 8px calc(32px + 30vh);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
    transition: width .18s ease, max-width .18s ease, min-width .18s ease, box-shadow .18s ease;
  }

  #desktop-app-rail.desktop-app-rail::-webkit-scrollbar { display: none; }

  #desktop-app-rail.desktop-app-rail:hover,
  #desktop-app-rail.desktop-app-rail:focus-within {
    width: 228px;
    max-width: 228px;
    min-width: 228px;
    box-shadow: 8px 0 24px rgba(0, 0, 0, .06);
  }

  #desktop-app-rail .desktop-rail-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-main);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 55px;
    height: 55px;
    padding: 0 12px;
    margin: 0;
    border-radius: 14px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    white-space: nowrap;
    flex: 0 0 auto;
    float: none;
  }

  #desktop-app-rail .desktop-rail-item:hover,
  #desktop-app-rail .desktop-rail-item:focus-visible {
    background: #f4f6f3;
  }

  #desktop-app-rail .desktop-rail-item svg,
  #desktop-app-rail .desktop-rail-item i {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    color: #222;
  }

  #desktop-app-rail .desktop-rail-label {
    display: inline-block;
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    clip: auto;
    clip-path: none;
    overflow: hidden;
    opacity: 0;
    max-width: 0;
    white-space: nowrap;
    text-align: left;
    transform: translateX(-6px);
    transition: opacity .16s ease, transform .16s ease, max-width .16s ease;
  }

  #desktop-app-rail.desktop-app-rail:hover .desktop-rail-label,
  #desktop-app-rail.desktop-app-rail:focus-within .desktop-rail-label {
    opacity: 1 !important;
    max-width: 160px;
    overflow: visible;
    transform: none;
  }

  #desktop-app-rail .desktop-rail-item .header-unread-badge--inline {
    position: static;
    margin-left: auto;
  }
}

html[data-nutie-theme-resolved="dark"] .desktop-app-rail {
  background: #11161d;
  border-right-color: #29313a;
}

html[data-nutie-theme-resolved="dark"] .desktop-rail-item {
  color: #f5f7fa;
}

html[data-nutie-theme-resolved="dark"] .desktop-rail-item:hover,
html[data-nutie-theme-resolved="dark"] .desktop-rail-item:focus-visible {
  background: #151b22;
}

html[data-nutie-theme-resolved="dark"] .desktop-rail-item svg,
html[data-nutie-theme-resolved="dark"] .desktop-rail-item i {
  color: #f5f7fa;
}

/* Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.logo-symbol {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-symbol svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-family: var(--font-eng);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text-main);
}

.logo-title {
  display: inline-block;
  white-space: nowrap;
  transition: text-shadow 0.22s ease;
}

.logo-text:hover .logo-title {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

/* 누티 로고와 홈 사이 세로 바 — 로고와 메뉴 사이 여유 */
.header-logo-divider {
  width: 1px;
  height: 14px;
  background-color: var(--text-main);
  border-radius: 1px;
  flex-shrink: 0;
  margin-left: 14px;
  margin-right: 0;
}

/* Navigation Menu */
.nav-menu {
  flex-shrink: 0;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 24px;
  margin-left: 32px;
  align-items: center;
  height: 60px;
}

.nav-menu ul li {
  flex-shrink: 0;
}

.nav-tab-btn {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

/* 채팅 관리자 프리뷰: 비관리자·비로그인에게 채팅 메뉴만 숨김 (#view-chat 섹션은 유지) */
body:not(.chat-preview-admin) [data-target="view-chat"] {
  display: none !important;
}
body:not(.chat-preview-admin) li:has(> [data-target="view-chat"]) {
  display: none !important;
}

.nav-tab-btn:hover {
  color: var(--primary-color);
}

.nav-tab-btn.active {
  color: var(--primary-color);
}

.nav-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.nav-tab-btn.special-ad {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vendor-hub-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 12px;
}

.vendor-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  border-bottom: none;
  flex-shrink: 0;
}

.vendor-hub-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding-bottom: 0;
}

.vendor-hub-tools .header-search {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(420px, 100%);
  max-width: 420px;
  margin: 0 auto 0 0;
}

.vendor-hub-tools .search-input-wrapper {
  width: 100%;
  background-color: #ffffff;
  border-color: var(--border-color);
}

.vendor-hub-tools .search-input-wrapper:hover,
.vendor-hub-tools .search-input-wrapper:focus-within {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.vendor-hub-tools .write-btn {
  flex-shrink: 0;
  margin: 0;
}

.vendor-hub-subtitle {
  margin: 0 0 8px;
  line-height: 1.6;
  word-break: keep-all;
}

.vendor-hub-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0 2px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.vendor-hub-tab:hover {
  color: var(--text-main);
}

.vendor-hub-tab.active {
  color: var(--primary-color);
  font-weight: 700;
}

.vendor-hub-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: var(--primary-color);
}

@media (max-width: 900px) {
  .vendor-hub-toolbar {
    margin: 0 0 8px;
    border-bottom: none;
  }

  .vendor-hub-tabs {
    display: none;
  }

  .vendor-hub-tools {
    width: 100%;
    padding-bottom: 0;
  }

  .vendor-hub-tools .header-search {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    max-width: none;
    width: 100%;
  }

  .vendor-hub-tools .write-btn,
  .vendor-hub-subtitle {
    display: none;
  }

  #view-product-search .vendor-hub-list-head .write-btn {
    display: inline-flex;
  }
}

.ad-tag {
  background-color: rgba(255, 75, 75, 0.1);
  color: var(--primary-color);
  font-family: var(--font-eng);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

/* Search Box */
.header-search {
  flex-grow: 1;
  min-width: 0;
  max-width: 320px;
  margin: 0 12px 0 40px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #f2f4f6;
  border-radius: 20px;
  height: 38px;
  padding: 0 16px;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.search-input-wrapper:focus-within {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.search-input-wrapper input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.chat-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  text-align: center;
  color: var(--text-sub);
}

#chat-coming-soon-panel[hidden],
#chat-app[hidden],
#chat-room-panel[hidden],
#view-chat [hidden] {
  display: none !important;
}

body.chat-preview-admin #chat-coming-soon-panel,
#view-chat.chat-unlocked #chat-coming-soon-panel {
  display: none !important;
}

body.chat-preview-admin #chat-app[hidden],
#view-chat.chat-unlocked #chat-app[hidden] {
  display: flex !important;
  flex-direction: column;
}

.chat-coming-soon i,
.chat-coming-soon svg {
  width: 40px;
  height: 40px;
  color: var(--primary-color);
}

.chat-coming-soon p {
  margin: 0;
  line-height: 1.6;
  font-size: 15px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.login-btn {
  background-color: #adb5bd;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.login-btn:hover {
  background-color: #868e96;
}

body.is-home-view .login-btn {
  background-color: #8bc34a;
}

body.is-home-view .login-btn:hover {
  background-color: #7cb342;
}

/* "글쓰기" button shown next to profile after login */
.write-btn {
  background-color: var(--primary-color); /* 저장 버튼과 동일한 빨간색 */
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.write-btn:hover {
  background-color: var(--primary-hover);
}

.header-write-btn {
  padding: 8px 16px;
  background-color: #8bc34a;
}

.header-write-btn:hover {
  background-color: #7cb342;
}

/* Logged-in User Profile (Desktop Header) */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
  background: #2563eb;
  vertical-align: middle;
}

.author-nickname-btn,
.author-nickname-static {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

/* Profile Avatar Dropdown Menu (내정보 / 작성한 글 / 즐겨찾기 / 로그아웃) */
.user-profile-dropdown-wrapper {
  position: relative;
}

.user-profile-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  overflow: visible;
  transition: var(--transition-fast);
}

.user-profile-trigger-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: visible;
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.mobile-user-avatar {
  width: 56px;
  height: 56px;
}

.user-profile-trigger:hover {
  background-color: #f2f4f6;
}

.profile-caret {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.user-profile-dropdown-wrapper.active .profile-caret {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 1000;
}

.user-profile-dropdown-wrapper.active .user-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: 8px;
  text-align: left;
  transition: var(--transition-fast);
}

.dropdown-item .header-unread-badge--inline {
  margin-left: auto;
}

.dropdown-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background-color: #f2f4f6;
  color: var(--text-main);
}

.dropdown-item.dropdown-item-danger:hover {
  background-color: rgba(255, 75, 75, 0.08);
  color: var(--primary-color);
}

.mobile-toggle-btn {
  display: none;
  color: var(--text-main);
  padding: 6px;
  line-height: 0;
}

.mobile-toggle-btn svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Mobile Sidebar Menu
   ========================================================================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -220px;
  width: 220px;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1001;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sidebar.active {
  right: 0;
}

.sidebar-header {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  font-family: var(--font-eng);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.close-btn {
  color: var(--text-sub);
  padding: 4px;
}

.mobile-nav {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7.2px;
}

.mobile-nav-section {
  display: flex;
  flex-direction: column;
  gap: 3.6px;
}

.mobile-nav-section[hidden] {
  display: none;
}

.mobile-nav-section-title {
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: -0.02em;
  padding: 6px 12px;
  line-height: 1.62;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.mobile-nav-section-title:hover,
.mobile-nav-section-title:focus-visible,
.mobile-nav-section.is-open > .mobile-nav-section-title {
  background-color: #f2f4f6;
  color: var(--primary-color);
}

.mobile-nav ul.mobile-nav-sublist {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 1.2px;
  margin: 0;
  padding: 0 0 0 8px;
}

.mobile-nav-section.is-open > ul.mobile-nav-sublist,
.mobile-nav-section--static > ul.mobile-nav-sublist {
  display: flex;
}

.mobile-channel-btn {
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 4.8px 12px;
  border-radius: 8px;
  transition: var(--transition-fast);
  line-height: 1.62;
}

.mobile-channel-btn:hover,
.mobile-channel-btn:focus-visible {
  background-color: #f2f4f6;
  color: var(--primary-color);
}

.mobile-tab-btn {
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 6px 12px;
  line-height: 1.62;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.mobile-tab-btn:hover, .mobile-tab-btn.active {
  background-color: #f2f4f6;
  color: var(--primary-color);
}

.mobile-auth {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.mobile-util-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.mobile-util-btn.primary {
  background-color: #adb5bd;
  color: #ffffff;
}

.mobile-util-btn.primary:hover {
  background-color: #868e96;
}

/* Mobile login button transformed into a "글쓰기" button after login */
.mobile-util-btn.write-btn-mode {
  background-color: #8bc34a;
  color: #ffffff;
  margin-bottom: 12px;
}

.mobile-util-btn.write-btn-mode:hover {
  background-color: #7cb342;
}

/* Logged-in User Profile (Mobile Sidebar) */
.mobile-user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.mobile-user-profile .user-name {
  max-width: none;
}

.mobile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 내정보 / 작성한 글 / 즐겨찾기 / 로그아웃 링크 목록 (모바일) */
.mobile-user-menu-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7.5px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: 8px;
  text-align: left;
  transition: var(--transition-fast);
}

.mobile-menu-link .header-unread-badge--inline {
  margin-left: auto;
}

.mobile-menu-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.mobile-menu-link:hover {
  background-color: #f2f4f6;
  color: var(--text-main);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  padding-top: 40px;
  padding-bottom: 60px;
  min-height: calc(100vh - 180px);
}

.main-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Views display logic */
.tab-view {
  display: none;
  /* 탭 해시(#view-channels 등)가 상단 로고·메뉴를 건너뛰지 않도록 */
  scroll-margin-top: 96px;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

#view-school-photo-upload.tab-view.active,
#view-school-bid-contracts.tab-view.active {
  animation: none;
  opacity: 1;
  transform: none;
}

/* 새로고침 직후 해시 복원 전까지 홈이 먼저 보이지 않도록 숨김 */
html.route-boot .tab-view {
  display: none !important;
  animation: none !important;
}

/* 급식사진 파일 선택 복귀 재로드: 해당 탭만 숨기지 않아 body 회색이 드러나지 않게 한다 */
html.route-boot.route-boot-keep-school-photo #view-school-photo-upload.tab-view {
  display: block !important;
  animation: none !important;
  opacity: 1;
  transform: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

/* 커뮤니티 제목: 홈 '실시간 인기글'(.feed-header h3)과 동일한 크기 */
#view-channels .board-header {
  align-items: center;
  margin-bottom: 16px;
}

#view-channels .community-title-block {
  min-width: 0;
  flex: 1 1 auto;
}

#view-channels .community-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

#view-channels .view-title {
  font-size: 16px;
  margin-bottom: 0;
  flex-shrink: 0;
}

#view-channels .board-header .write-btn {
  margin-top: 0;
  flex-shrink: 0;
}

#view-channels .board-header-with-search {
  align-items: flex-start;
}

.view-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: -16px;
  margin-bottom: 24px;
}

/* ==========================================================================
   VIEW: CHANNELS (Channel Grid & Card styling)
   ========================================================================== */
.category-pills-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}

.category-pills-container > .community-sort {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

.category-pills-container:has(.pill-btn.active[data-filter="popular"]) > .community-sort {
  display: none;
}

#view-channels .pill-btn[data-filter="익명수다"],
#view-channels.community-v2-feed-mode .pill-btn[data-filter="익명수다"] {
  display: inline-flex !important;
}

.pill-btn {
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  color: #6c757d;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: -0.04em;
  text-shadow: none;
  transition: color 0.15s ease, font-weight 0.15s ease, text-shadow 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.pill-btn:hover {
  background: none;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.pill-btn.active {
  background: none;
  border: none;
  color: var(--text-main);
  font-weight: 700;
}

.pill-btn.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3.2px;
  background-color: var(--text-main);
}

.pill-btn.active:hover {
  background: none;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.pill-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
}

/* Channels Grid — 전체 글 게시판과 동일한 컨테이너 너비 */
#view-channels .channels-grid,
#view-channels .community-filter-posts {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  column-gap: 6px;
  row-gap: 6px;
}

/* 커뮤니티 / 분야별 커뮤니티 영역 구분 제목 */
.community-channel-section-heading {
  grid-column: 1 / -1;
  margin: 10px 0 2px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.community-channel-section-heading[data-section="분야"] {
  margin-top: 18px;
}

/* 커뮤니티 상단은 1차 텍스트 탭만 쓰고, 하위 카드·2차 탭은 쓰지 않는다 */

.community-filter-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.community-filter-cta .submit-btn,
.community-filter-cta .write-btn {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
}

/* 구인구직: 소개글과 게시판 카드 사이 간격 */
#view-reviews #job-board-grid-container {
  margin-top: 18px;
}

.job-board-source-table {
  display: none;
}

.job-region-tabs {
  margin: 4px 0 0;
}

.job-region-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.job-region-overview .feed-empty-message {
  grid-column: 1 / -1;
}

.job-region-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 0;
}

.job-region-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.job-region-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.job-region-card-more {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.job-region-card-more:hover {
  color: var(--primary-color);
}

.job-region-card-empty {
  margin: 10px 0 0;
  padding: 8px 0 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.job-region-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  cursor: pointer;
}

.job-region-post:first-of-type {
  margin-top: 6px;
}

.job-region-post-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.job-region-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
}

.job-region-post-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.job-region-post-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.job-region-post-main .job-region-post-title {
  flex: 1 1 auto;
}

.job-region-post > .job-region-post-main {
  grid-column: 1;
  grid-row: 2;
}

.job-region-post > .job-region-post-time {
  grid-column: 2;
  grid-row: 2;
}

.job-region-list-row .job-region-post-tags {
  margin-bottom: 4px;
}

.job-region-post-time {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.job-region-list-wrap {
  margin-top: 20px;
}

.job-region-list-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.job-region-list-wrap .job-district-tabs {
  margin-bottom: 12px;
}

.job-write-region-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.job-write-region-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.job-write-region-sublabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.job-write-indefinite-hint {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f7f7f8;
  color: var(--text-sub);
  font-size: 14px;
}

.job-write-indefinite-hint[hidden] {
  display: none;
}

.job-period-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.job-period-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.job-period-filter input[type="date"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
  font-size: 13px;
}

.job-period-filter-sep {
  color: var(--text-muted);
  font-size: 13px;
}

.job-period-filter-reset {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
}

.job-period-filter-reset:hover {
  background: #f7f7f8;
}

.job-region-post-period {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

.job-region-list-row .job-region-post-period {
  margin-top: 4px;
}

@media (max-width: 768px) {
  .job-region-tabs,
  .job-district-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .job-region-tabs::-webkit-scrollbar,
  .job-district-tabs::-webkit-scrollbar {
    display: none;
  }

  .job-region-overview {
    grid-template-columns: 1fr;
  }

  .job-write-region-row {
    grid-template-columns: 1fr;
  }
}

#view-channels .community-filter-posts .feed-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.community-filter-posts {
  margin-top: 8px;
}

.community-list-toolbar {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-height: 0;
}

.community-list-toolbar.is-search {
  display: flex;
  justify-content: space-between;
  margin: 2px 0 10px;
  min-height: 32px;
}

.community-list-toolbar.is-popular:not(.is-search) {
  display: none;
}

.community-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.community-sort-label {
  font-size: 11px;
  font-weight: 600;
  color: #868e96;
  letter-spacing: -0.02em;
}

.community-sort-select {
  height: 28px;
  min-width: 96px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868e96' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  color: #495057;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.03em;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.community-sort-select:hover {
  border-color: #ced4da;
  color: var(--text-main);
}

.community-sort-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 75, 75, 0.12);
}

.community-list-more-btn {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
  color: #868e96;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.community-list-more-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.community-filter-posts-header {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.community-list-toolbar.is-search .community-filter-posts-header {
  display: flex;
  margin-bottom: 0;
}

.community-filter-posts-header[hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

.community-filter-posts-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.community-channel-board-feed {
  margin-top: 0;
}

#view-channel-board .board-header {
  align-items: center;
}

#view-channel-board .board-header .view-title {
  margin-bottom: 0;
}

#view-channel-board .board-header .view-subtitle {
  margin-top: 4px;
  margin-bottom: 0;
}

#view-channel-board .board-header-actions {
  align-items: center;
  gap: 8px;
}

/* 채용정보 카드 레이아웃은 커뮤니티와 분리해서 유지 */
#job-hub-posts-list {
  gap: 8px;
}
#job-hub-posts-list .feed-post-card {
  padding: 10px 12px;
}
#job-hub-posts-list .feed-post-card:hover {
  background-color: #f1f3f5;
  border-color: #ced4da;
}


.channel-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: #ced4da;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.channel-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
}

/* Custom background colors for channel categories icons */
.icon-bubble { background-color: #e7f5ff; color: #228be6; }
.icon-briefcase { background-color: #fff4e6; color: #fd7e14; }
.icon-alert { background-color: #fff0f6; color: #f783ac; }
.icon-cooking { background-color: #ebfbee; color: #40c057; }
.icon-menu-plan { background-color: #ebfbee; color: #2f9e44; }
.icon-thumb { background-color: #e6fcf5; color: #20c997; }
.icon-shuffle { background-color: #f3f0ff; color: #7950f2; }
.icon-document { background-color: #e8f7ff; color: #15aabf; }
.icon-folder { background-color: #fff9db; color: #fab005; }
.icon-ai { background-color: #e3fafc; color: #1098ad; }
.icon-public-org { background-color: #fff9db; color: #f59f00; }
.icon-policy { background-color: #e7f5ff; color: #339af0; }
.icon-school { background-color: #edf2ff; color: #4c6ef5; }
.icon-location { background-color: #fff0e6; color: #e8590c; }
.icon-transfer-local { background-color: #f8f0fc; color: #be4bdb; }
.icon-job-teacher { background-color: #e7f5ff; color: #1971c2; }
.icon-job-teacher-seek { background-color: #e6fcf5; color: #0ca678; }
.icon-job-cook { background-color: #fff9db; color: #f08c00; }
.icon-job-cook-seek { background-color: #fff0f6; color: #d6336c; }
.icon-job-office { background-color: #f3f0ff; color: #7048e8; }
.icon-job-share { background-color: #fff4e6; color: #e8590c; }
.icon-region-portal { background-color: #fff0f6; color: #e64980; }

.work-major-tools-card {
  padding: 16px 12px 12px;
  border: 1px solid #e6e9ed;
  border-radius: 14px;
  background: #ffffff;
}

.work-major-tools-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 0 6px 14px;
}

.work-major-tools-title-wrap {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.work-major-tools-title-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 6px;
  min-width: 0;
  max-width: 100%;
}

.work-major-tools-title {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  color: #1e1e1e;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.work-major-tools-title-edit-btn {
  appearance: none;
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.work-major-tools-card.is-reordering .work-major-tools-title-edit-btn:not([hidden]),
.ai-work-tools-view.is-reordering .work-major-tools-title-edit-btn:not([hidden]) {
  display: inline-flex;
}

.work-major-tools-title-edit-btn:hover,
.work-major-tools-title-edit-btn:focus-visible {
  background: #eef2ff;
  color: #334155;
}

.work-major-tools-title-edit-btn svg {
  width: 14px;
  height: 14px;
}

.work-major-tools-title-editor {
  display: none;
  flex: 1 1 100%;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.work-major-tools-title-editor:not([hidden]) {
  display: flex;
}

.work-major-tools-card.is-reordering.is-title-editing .work-major-tools-title,
.ai-work-tools-view.is-title-editing .ai-work-tools-home-title-wrap > .work-major-tools-title {
  display: none;
}

.work-major-tools-title-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #fff;
  color: #1e1e1e;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.work-major-tools-title-count {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.work-major-tools-title-error {
  flex: 1 1 100%;
  margin: 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 600;
}

.work-major-tools-title-error[hidden],
.work-major-tools-save-status[hidden] {
  display: none;
}

.work-major-tools-save-status {
  flex: 1 1 100%;
  margin: 2px 0 0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.work-major-tools-save-status.is-error {
  color: #b42318;
}

.work-major-tools-save-status.is-ok {
  color: #027a48;
}

.ai-work-tools-home-title-wrap {
  display: none;
  margin-top: 8px;
}

.ai-work-tools-view.is-reordering .ai-work-tools-home-title-wrap {
  display: flex;
}

.work-major-tools-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

.work-major-tools-reorder-btn,
.work-major-tools-edit-btn {
  appearance: none;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid #d7dde4;
  border-radius: 8px;
  background: #ffffff;
  color: #495057;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.work-major-tools-reorder-btn:hover,
.work-major-tools-edit-btn:hover,
.work-major-tools-reorder-btn:focus-visible,
.work-major-tools-edit-btn:focus-visible {
  background: #f8f9fa;
}

.work-major-tools-edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.work-major-tools-edit-actions[hidden],
.work-major-tools-reorder-btn[hidden] {
  display: none !important;
}

.work-major-tools-edit-btn--save {
  background: #212529;
  border-color: #212529;
  color: #ffffff;
}

.work-major-tools-edit-btn--save:hover,
.work-major-tools-edit-btn--save:focus-visible {
  background: #343a40;
}

.work-major-tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-major-tools-list[hidden],
.work-major-tools-hub[hidden] {
  display: none !important;
}

.work-major-tool-item {
  position: relative;
  width: 100%;
}

.work-major-tool-item[hidden] {
  display: none !important;
}

.work-major-tool-drag {
  appearance: none;
  display: none;
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  width: 22px;
  height: 28px;
  margin: 0;
  padding: 4px 3px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-50%);
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(3, 4px);
  place-content: center;
  gap: 3px;
  cursor: grab;
  touch-action: none;
}

.work-major-tool-drag span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64748b;
}

.work-major-tools-list.is-reordering .work-major-tool-drag {
  display: grid;
}

.work-major-tool-drag:hover,
.work-major-tool-drag:focus-visible {
  background: #eef2ff;
}

.work-major-tool-drag:active {
  cursor: grabbing;
}

.work-major-tools-list.is-reordering .work-major-tool-btn {
  cursor: default;
  touch-action: pan-y;
  padding-right: 36px;
}

.work-major-tools-list.is-reordering .work-major-tool-btn:hover,
.work-major-tools-list.is-reordering .work-major-tool-btn:focus-visible {
  transform: none;
}

.work-major-tool-item.is-dragging {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  border-radius: 16px;
  opacity: 0.96;
  transform: translateY(-2px) scale(1.015);
}

body.is-work-major-tool-dragging,
body.is-work-major-tool-dragging * {
  cursor: grabbing !important;
}

.work-major-tool-item--placeholder {
  border: 1px dashed #c5ced8;
  border-radius: 16px;
  background: #f4f6f8;
  box-sizing: border-box;
}

.ai-work-tools-view .board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-work-tools-list.is-reordering {
  display: flex;
  flex-direction: column;
}

.work-major-tool-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 12px 12px 10px;
  border: none;
  border-radius: 16px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.work-major-tool-btn[hidden] {
  display: none !important;
}

.work-major-tool-btn:hover,
.work-major-tool-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.work-major-tool-btn--menu {
  background: #fff6e4;
}

.work-major-tool-btn--haccp {
  background: #e8f6ee;
}

.work-major-tool-btn--calc {
  background: #fbeaf0;
}

.work-major-tool-btn--photo {
  background: #f3ebff;
}

.work-major-tool-btn--check {
  background: #ebf5ff;
}

.work-major-tool-btn--bid {
  background: #e4f7ea;
}

.work-major-tool-btn--school {
  background: #eef6e8;
}

.work-major-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 42px;
}

.work-major-tool-btn--menu .work-major-tool-icon {
  color: #e8892d;
}

.work-major-tool-btn--haccp .work-major-tool-icon {
  color: #2f9e5d;
}

.work-major-tool-btn--calc .work-major-tool-icon {
  color: #e0568a;
}

.work-major-tool-btn--photo .work-major-tool-icon {
  color: #7b4fc4;
}

.work-major-tool-btn--check .work-major-tool-icon {
  color: #1a63b9;
}

.work-major-tool-btn--bid .work-major-tool-icon {
  color: #1f8a4c;
}

.work-major-tool-btn--school .work-major-tool-icon {
  color: #528c47;
}

.work-major-tool-icon svg {
  width: 26px;
  height: 26px;
}

.work-major-tool-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.work-major-tool-name {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.work-major-tool-btn--menu .work-major-tool-name {
  color: #d97a1f;
}

.work-major-tool-btn--haccp .work-major-tool-name {
  color: #2b9a5a;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.work-major-tool-btn--calc .work-major-tool-name {
  color: #de5689;
  white-space: nowrap;
}

.work-major-tool-btn--photo .work-major-tool-name {
  color: #7b4fc4;
  white-space: nowrap;
}

.work-major-tool-btn--check .work-major-tool-name {
  color: #1a63b9;
  white-space: nowrap;
}

.work-major-tool-btn--bid .work-major-tool-name {
  color: #1c7f46;
  white-space: nowrap;
}

.work-major-tool-btn--school .work-major-tool-name {
  color: #3f6f36;
}

.work-major-tool-chevron {
  color: #8b95a1;
  font-weight: 700;
  font-size: 12px;
}

.work-major-tool-desc {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.work-major-tool-btn--menu .work-major-tool-desc {
  color: #8a7358;
}

.work-major-tool-btn--haccp .work-major-tool-desc {
  color: #5f7d6c;
}

.work-major-tool-btn--calc .work-major-tool-desc {
  color: #8a6574;
}

.work-major-tool-btn--photo .work-major-tool-desc {
  color: #74668a;
}

.work-major-tool-btn--check .work-major-tool-desc {
  color: #5a7a94;
}

.work-major-tool-btn--bid .work-major-tool-desc {
  color: #5d8168;
}

.work-major-tool-btn--school .work-major-tool-desc {
  color: #5d7a55;
}

.work-major-tools-hub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.work-major-tools-hub .work-major-tool-btn {
  box-sizing: border-box;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  min-height: 108px;
  height: 100%;
  padding: 14px 12px;
}

#work-major-tools-hub {
  gap: 9px;
}

#work-major-tools-hub .work-major-tool-btn {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 13px;
}

.work-major-tools-hub .work-major-tool-icon {
  height: auto;
}

.work-major-tools-hub .work-major-tool-name,
.work-major-tools-hub .work-major-tool-desc {
  white-space: normal;
  word-break: keep-all;
}

#ai-work-tools-hub {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 768px) {
  #ai-work-tools-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-work-tools-view .work-tool-suggestion-card--aux {
    margin-top: 16px;
    padding: 8px 4px 0;
    border: 0;
    border-top: 1px solid #eef1f4;
    border-radius: 0;
    background: transparent;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1px;
  }

  .ai-work-tools-view .work-tool-suggestion-card--aux .work-tool-suggestion-cta {
    margin-left: 15px;
  }
}

@media (max-width: 320px) {
  #ai-work-tools-hub {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* AI 업무도구 화면: 홈 '주요 업무도구' 카드를 그대로 재사용하고 배치만 그리드로 바꾼다 */
.ai-work-tools-view .view-subtitle {
  word-break: keep-all;
}

@media (max-width: 768px) {
  .ai-work-tools-view .board-header {
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ai-work-tools-view .work-major-tools-actions {
    width: 100%;
    align-items: stretch;
  }

  .ai-work-tools-view .work-major-tools-edit-actions {
    justify-content: flex-start;
  }
}

.ai-work-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.ai-work-tools-list .work-major-tool-btn {
  box-sizing: border-box;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  padding: 14px 12px;
  border: 0.4px solid transparent;
}

.ai-work-tools-list .work-major-tool-btn--photo {
  border-color: #7b4fc4;
}

.ai-work-tools-list .work-major-tool-btn--menu {
  border-color: #d97a1f;
}

.ai-work-tools-list .work-major-tool-btn--calc {
  border-color: #de5689;
}

.ai-work-tools-list .work-major-tool-btn--check {
  border-color: #1a63b9;
}

.ai-work-tools-list .work-major-tool-btn--bid {
  border-color: #1c7f46;
}

.ai-work-tools-list .work-major-tool-btn--school {
  border-color: #5a8f3a;
}

.ai-work-tools-list .work-major-tool-btn--haccp {
  border-color: #2b9a5a;
}

.ai-work-tools-list .work-major-tool-icon {
  height: auto;
}

/* 좁은 카드 폭에서 제목·설명이 잘리지 않도록 줄바꿈을 허용한다 */
.ai-work-tools-list .work-major-tool-name {
  white-space: normal;
  font-size: 12.5px;
}

.ai-work-tools-list .work-major-tool-btn--photo .work-major-tool-name {
  white-space: normal;
}

.ai-work-tools-list .work-major-tool-desc {
  white-space: normal;
}

/* 학교급식 업무도구 전용. 홈·AI 업무도구 카드에는 적용하지 않는다. */
.school-work-tools-view {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.school-work-tools-view #school-work-tools-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.school-work-tools-view #school-work-tools-list > .work-major-tool-item,
.school-work-tools-view #school-work-tools-list > .work-major-tool-btn {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn {
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 128px;
  height: 100%;
  padding: 20px 22px;
  border-radius: 12px;
  border-width: 1px;
  border-style: solid;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-icon svg {
  width: 24px;
  height: 24px;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-text {
  flex: 1 1 auto;
  gap: 6px;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  white-space: normal;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-desc {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--photo {
  background: #f3ebff;
  border-color: #7b4fc4;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--photo .work-major-tool-icon {
  color: #7b4fc4;
  background: rgba(123, 79, 196, 0.16);
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--photo .work-major-tool-name {
  color: #7b4fc4;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--photo .work-major-tool-desc {
  color: #74668a;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--menu {
  background: #fff6e4;
  border-color: #d97a1f;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--menu .work-major-tool-icon {
  color: #e8892d;
  background: rgba(232, 137, 45, 0.16);
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--menu .work-major-tool-name {
  color: #d97a1f;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--menu .work-major-tool-desc {
  color: #8a7358;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--check {
  background: #ebf5ff;
  border-color: #1a63b9;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--check .work-major-tool-icon {
  color: #1a63b9;
  background: rgba(26, 99, 185, 0.16);
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--check .work-major-tool-name {
  color: #1a63b9;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--check .work-major-tool-desc {
  color: #5a7a94;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--bid {
  background: #e4f7ea;
  border-color: #1c7f46;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--bid .work-major-tool-icon {
  color: #1f8a4c;
  background: rgba(31, 138, 76, 0.16);
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--bid .work-major-tool-name {
  color: #1c7f46;
}

.school-work-tools-view #school-work-tools-list .work-major-tool-btn--bid .work-major-tool-desc {
  color: #5d8168;
}

@media (max-width: 768px) {
  .school-work-tools-view {
    max-width: none;
  }

  .school-work-tools-view #school-work-tools-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .school-work-tools-view #school-work-tools-list .work-major-tool-btn {
    min-height: 96px;
    padding: 16px 16px;
    gap: 12px;
  }
}

.work-shortcuts-card {
  padding: 18px 14px 14px;
  border: 1px solid #e6e9ed;
  border-radius: 14px;
  background: #ffffff;
}

.work-shortcuts-header {
  margin-bottom: 12px;
}

.work-shortcuts-header h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.work-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 2px;
}

.work-shortcuts-items {
  display: contents;
}

.work-shortcut-link {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 5px;
  padding: 8px 1px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.work-shortcut-link:hover {
  background: #f6f8fa;
  color: var(--text-main);
  transform: translateY(-1px);
}

.work-shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f4f6f8;
  box-sizing: border-box;
}

.work-shortcut-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.work-shortcut-icon--logo {
  background: #ffffff;
  border: 1px solid #eceff3;
}

.work-shortcut-link--jobsites .work-shortcut-icon {
  background: #f3f0ff;
  color: #7048e8;
}

/* 1행: ChatGPT·Gemini·Drive·축산물원패스, 2행: Canva·미리캔버스·구인사이트·더보기 */
.work-shortcuts-items > .work-shortcut-link:nth-child(1) { order: 1; }
.work-shortcuts-items > .work-shortcut-link:nth-child(2) { order: 2; }
.work-shortcuts-items > .work-shortcut-link:nth-child(3) { order: 3; }
.work-shortcut-link--livestock-onepass { order: 4; }
.work-shortcuts-items > .work-shortcut-link:nth-child(n + 4) { order: 5; }
.work-shortcut-link--jobsites { order: 6; }
.work-shortcut-link--more { order: 10; }

.work-shortcut-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.work-shortcut-label {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.work-shortcut-label--wrap {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: normal;
}

.work-shortcut-more-wrap .work-shortcut-link {
  width: 100%;
}

.work-shortcut-link--more .work-shortcut-icon {
  background: #f1f3f5;
  color: #495057;
}

.work-shortcut-more-wrap {
  position: relative;
  min-width: 0;
}

.work-shortcut-more-popover {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  z-index: 30;
  width: max-content;
  min-width: 176px;
  max-width: min(240px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid #e6e9ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(33, 37, 41, 0.12);
}

.work-shortcut-more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-shortcut-more-item {
  appearance: none;
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  word-break: keep-all;
  cursor: pointer;
}

.work-shortcut-more-item:hover,
.work-shortcut-more-item:focus-visible {
  background: #f6f8fa;
}

.work-shortcut-edit-modal-content {
  max-width: 440px;
  max-height: min(86vh, 740px);
  display: flex;
  flex-direction: column;
  padding: 28px 22px 20px;
}

.work-shortcut-edit-modal-content .modal-header-desc {
  margin-bottom: 14px;
  text-align: left;
}

.work-shortcut-edit-modal-content .modal-header-desc h3 {
  font-size: 18px;
}

.work-shortcut-edit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  min-height: 0;
  max-height: min(48vh, 380px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.work-shortcut-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  background: #ffffff;
  touch-action: manipulation;
}

.work-shortcut-edit-row.is-dragging {
  box-shadow: 0 8px 20px rgba(33, 37, 41, 0.14);
  border-color: #d7dde4;
  opacity: 0.96;
}

.work-shortcut-edit-row--placeholder {
  border-style: dashed;
  background: #f6f8fa;
}

.work-shortcut-edit-handle {
  appearance: none;
  flex: 0 0 28px;
  width: 28px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #868e96;
  cursor: grab;
  touch-action: none;
}

.work-shortcut-edit-handle:active {
  cursor: grabbing;
}

.work-shortcut-edit-handle svg {
  width: 16px;
  height: 16px;
}

.work-shortcut-edit-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-color);
}

.work-shortcut-edit-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f4f6f8;
  overflow: hidden;
}

.work-shortcut-edit-icon.is-logo {
  background: #ffffff;
  border: 1px solid #eceff3;
}

.work-shortcut-edit-icon img,
.work-shortcut-edit-icon svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.work-shortcut-edit-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: keep-all;
}

.work-shortcut-edit-delete {
  appearance: none;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #868e96;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.work-shortcut-edit-delete:hover,
.work-shortcut-edit-delete:focus-visible {
  background: #fff5f5;
  color: #e03131;
}

.work-shortcut-add-toggle {
  appearance: none;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #d7dde4;
  border-radius: 10px;
  background: #f8fafb;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.work-shortcut-add-toggle:hover,
.work-shortcut-add-toggle:focus-visible {
  background: #f1f4f7;
}

.work-shortcut-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.work-shortcut-add-form[hidden] {
  display: none !important;
}

.work-shortcut-add-submit {
  appearance: none;
  align-self: flex-end;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d7dde4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.work-shortcut-add-error {
  margin: 0;
  color: #e03131;
  font-size: 12px;
  line-height: 1.4;
}

.work-shortcut-edit-modal-content .submit-btn {
  width: 100%;
  margin-top: 14px;
}

.work-shortcut-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 4000;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(33, 37, 41, 0.9);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(33, 37, 41, 0.18);
  pointer-events: none;
}

.work-shortcut-toast[hidden] {
  display: none !important;
}

.work-tool-suggestion-card {
  appearance: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
  padding: 8px 6px 2px;
  border: 0;
  border-top: 1px solid #eef1f4;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.work-tool-suggestion-card--aux {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e6e9ed;
  border-radius: 12px;
  background: #f7f8fa;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.work-tool-suggestion-card:hover,
.work-tool-suggestion-card:focus-visible {
  background: #f8fafb;
}

.work-tool-suggestion-heading {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.work-tool-suggestion-icon {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.35;
}

.work-tool-suggestion-title {
  min-width: 0;
  color: #5b6570;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.work-tool-suggestion-cta {
  margin-left: 15px;
  color: #3d6b54;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.work-tool-suggestion-card--aux .work-tool-suggestion-cta {
  margin-left: 0;
}

@media (max-width: 768px) {
  .work-tool-suggestion-card {
    margin-top: 16px;
    padding: 8px 4px 0;
  }

  .work-tool-suggestion-card--aux {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .work-major-tools-card .work-tool-suggestion-card--aux {
    margin-top: 12px;
  }
}

.work-tool-suggestion-info-modal-content {
  max-width: 360px;
}

.work-tool-suggestion-info-modal-content .submit-btn,
.work-tool-suggestion-modal-content .submit-btn {
  width: 100%;
  margin-top: 4px;
}

.home-banner-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* 홈 왼쪽 사이드바 하단: 세로로 쌓아 붙인다 */
.home-banner-row--sidebar {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.home-banner-row--sidebar .channel-card {
  padding: 12px;
  gap: 10px;
}

.home-banner-row--sidebar .channel-icon {
  width: 40px;
  height: 40px;
}

.home-banner-row--sidebar .channel-icon svg {
  width: 18px;
  height: 18px;
}

.home-banner-row--sidebar .channel-name {
  font-size: 13px;
}

.home-banner-row--sidebar .channel-desc {
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.region-portal-banner,
.home-banner-link {
  appearance: none;
  font-family: inherit;
  text-align: left;
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

.office-link-grid {
  margin-top: 8px;
}

#job-office-link-grid.job-site-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

#job-office-link-grid .job-site-empty-message {
  grid-column: 1 / -1;
}

.job-site-category-tabs {
  margin-top: 8px;
}

.job-site-card {
  text-decoration: none;
  color: inherit;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
#job-office-link-grid .job-site-card[hidden],
#job-office-link-grid .job-site-card.is-job-site-filtered-out {
  display: none !important;
}

.job-site-card:hover {
  background-color: #f1f3f5;
}

button.job-site-card {
  appearance: none;
  font-family: inherit;
  text-align: left;
}

.job-site-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
}

.job-site-card .channel-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.job-site-card .channel-name svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.job-site-card .channel-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-site-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-site-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px 8px;
  line-height: 1.4;
}

.job-site-card-go {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary-color);
}

.job-site-card.is-pending {
  cursor: default;
  pointer-events: none;
}

.job-site-card.is-pending:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-color);
  background-color: #ffffff;
}

.job-site-card.is-pending .job-site-card-go {
  color: var(--text-muted);
}

.job-site-footer-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.region-portal-link-item.is-disabled {
  pointer-events: none;
  opacity: 0.6;
  font-weight: 600;
}

.region-portal-link-item.is-disabled:hover {
  border-color: var(--border-color);
  color: var(--text-main);
  background-color: #ffffff;
}

@media (max-width: 1024px) {
  #job-office-link-grid.job-site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #job-office-link-grid.job-site-grid {
    grid-template-columns: 1fr;
  }
}

a.office-link-card {
  text-decoration: none;
  color: inherit;
}

a.office-link-card:hover .channel-name {
  color: var(--primary-color);
}

a.office-link-card .channel-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-icon.office-mark-icon {
  background: #ffffff;
  border: 1px solid #e9ecef;
  padding: 0;
  overflow: hidden;
}

.channel-icon.office-mark-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.channel-card:hover .channel-icon {
  transform: scale(1.08);
}

.channel-info {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.channel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.channel-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.4;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  position: relative;
}

/* 줄임된 소개: 호버 시 전체 내용 툴팁 */
.channel-desc.has-tooltip {
  cursor: default;
}

.channel-desc.has-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: min(320px, 70vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: #212529;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  word-break: keep-all;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.channel-desc.has-tooltip:hover::before {
  content: '';
  position: absolute;
  left: 16px;
  bottom: calc(100% + 2px);
  z-index: 21;
  border: 6px solid transparent;
  border-top-color: #212529;
  pointer-events: none;
}

/* ==========================================================================
   VIEW: HOME (Dashboard, Keywords, Feed)
   ========================================================================== */
/*
  좌·우를 240px 고정폭으로 두면 창이 좁아질 때 줄어드는 폭을 가운데 칼럼만
  흡수해 1100px 디자인의 비율이 깨진다(설치형 PWA 창처럼 최대화되지 않은
  창에서 두드러짐). fr 비율로 두면 폭이 달라도 240:540:240 비율이 유지되고,
  컨테이너가 1060px일 때는 gap 40px를 뺀 1020px가 그대로 240/540/240으로
  나뉘어 기존 데스크톱 렌더링과 동일하다.
  1101px 이상에서는 홈 컨테이너만 넓히고 좌/우는 240px를 유지해
  가운데 2열 카드에 추가 폭을 배정한다.
*/
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 240fr) minmax(0, 540fr) minmax(0, 240fr);
  gap: 20px;
}

@media (min-width: 1101px) {
  .main-container:has(#view-home.active) {
    max-width: 1280px;
  }

  .home-layout {
    grid-template-columns: 240px minmax(0, 1fr) 240px;
  }
}

/* 홈 왼쪽 사이드바: 배너·인기검색어·최신글 사이 세로 간격 균등 */
.home-sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.home-sidebar-left > .widget-card,
.home-sidebar-left > .work-major-tools-card {
  margin-bottom: 0;
}

.home-sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: start;
}

.home-sidebar-right > .widget-card,
.home-sidebar-right > .work-shortcuts-card {
  margin-top: 0;
  margin-bottom: 0;
}

.widget-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.home-login-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 20px 16px 16px;
}

.home-login-cta-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.home-login-cta-login,
.home-login-cta-signup {
  width: 100%;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.home-login-cta-login {
  background-color: #8bc34a;
  color: #ffffff;
}

.home-login-cta-login:hover {
  background-color: #7cb342;
}

.home-login-cta-signup {
  background-color: #ffffff;
  color: #212529;
  border: 1px solid #343a40;
}

.home-login-cta-signup:hover {
  background-color: #f8f9fa;
}

.home-login-cta-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.home-login-cta-links[hidden] {
  display: none;
}

.home-login-cta-links button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.home-login-cta-links button:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* ==========================================================================
   VIEW: ABOUT (서비스 소개)
   ========================================================================== */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

#view-about .view-title,
#view-about .view-subtitle,
#view-about .about-content {
  max-width: 760px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#view-about .about-section {
  width: 100%;
  box-sizing: border-box;
}

.about-section {
  margin-bottom: 0;
  padding: 28px;
}

.my-profile-card {
  margin-top: 8px;
  padding: 24px 28px;
  max-width: 720px;
}

.my-profile-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 16px;
}

.my-info-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.my-info-card-head h3 {
  margin: 0;
}

.my-info-avatar {
  width: 56px;
  height: 56px;
}

.my-profile-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.my-profile-list dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.my-profile-list dd {
  font-size: 14px;
  color: var(--text-main);
  margin: 0;
  word-break: break-word;
}

.my-profile-nickname-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.my-public-profile-help,
.member-profile-posts-empty {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.my-public-profile-photo-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.my-public-profile-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.my-public-profile-photo-menu {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.my-public-profile-photo-menu[hidden] {
  display: none !important;
}

.my-posts-public-setting {
  margin: 8px 0 16px;
}

.member-profile-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.member-profile-card-copy h3 {
  margin: 0 0 6px;
}

.member-profile-bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  white-space: pre-wrap;
}

.member-profile-bio.is-empty {
  color: var(--text-muted);
}

.member-profile-avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  overflow: hidden;
  flex: 0 0 auto;
  background: #ffe8e8;
  color: #ff7a7a;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.member-profile-avatar-btn span {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.member-profile-avatar-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.member-profile-avatar-btn img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.member-profile-avatar-btn.is-static {
  cursor: default;
}

.member-profile-avatar-btn.my-public-profile-photo-preview,
.member-profile-page-avatar {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.detail-comment-item.has-profile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.detail-comment-item.has-profile > .member-profile-avatar-btn {
  margin-top: 2px;
}

.detail-comment-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.detail-comment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.member-profile-open-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.member-profile-open-btn:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.detail-comment-compose-avatar {
  margin-bottom: 2px;
}

.my-nickname-open-btn {
  appearance: none;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.my-nickname-open-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.my-nickname-card.is-highlight {
  outline: 2px solid rgba(255, 75, 75, 0.35);
  outline-offset: 2px;
}

.my-school-level-card.is-highlight {
  outline: 2px solid rgba(255, 75, 75, 0.35);
  outline-offset: 2px;
}

.my-profile-empty {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
}

.my-password-card {
  margin-top: 16px;
}

.my-withdraw-card {
  margin-top: 16px;
}

.my-withdraw-help {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.my-withdraw-open-btn {
  width: 100%;
  background: #fff;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
}

.my-withdraw-open-btn:hover {
  background: #fff5f5;
  color: #a51111;
}

.simple-notice-modal-content .submit-btn {
  width: 100%;
  margin-top: 8px;
}

.my-nickname-card {
  margin-top: 16px;
}

.my-nickname-help {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.my-nickname-form .submit-btn {
  width: 100%;
  margin-top: 4px;
}

.my-school-level-card {
  margin-top: 16px;
}

.my-school-level-help {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.my-school-level-form .submit-btn {
  width: 100%;
  margin-top: 4px;
}

.my-password-help {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.my-password-form .submit-btn {
  width: 100%;
  margin-top: 4px;
}

.about-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.about-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.about-section p + p {
  margin-top: 12px;
}

.about-section .about-quote {
  margin: 16px 0;
  font-style: italic;
}

.legal-doc-card .terms-effective-date {
  margin-top: 0;
}

.legal-doc-body {
  overflow: visible;
  flex: none;
  max-height: none;
}

.about-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-feature-list li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
  /* 첫 줄(제목)은 그대로, 아래칸으로 넘어간 설명만 5칸 들여쓰기 */
  padding-left: 5ch;
  text-indent: -5ch;
}

.about-feature-list li strong {
  color: var(--text-main);
}

/* ==========================================================================
   VIEW: SUPPORT (고객센터 FAQ)
   ========================================================================== */
.support-content {
  max-width: 760px;
}

.support-faq-section {
  padding: 22px 24px;
}

.support-faq-category {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.support-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafbfc;
  overflow: hidden;
}

.support-faq-q {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  user-select: none;
}

.support-faq-q::-webkit-details-marker {
  display: none;
}

.support-faq-q::before {
  content: 'Q.';
  flex-shrink: 0;
  color: var(--primary-color);
  font-weight: 700;
}

.support-faq-item[open] .support-faq-q {
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.support-faq-a {
  margin: 0;
  padding: 14px 16px 16px 40px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-sub);
  background: #fff;
  position: relative;
}

.support-faq-a::before {
  content: 'A.';
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--secondary-color);
  font-weight: 700;
}

.support-contact-wrap {
  margin-top: 8px;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.support-contact-label {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

.support-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.support-contact-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.support-contact-btn:hover {
  box-shadow: 0 10px 24px rgba(25, 25, 25, 0.18);
  transform: translateY(-2px);
}

.support-contact-icon {
  width: 64px;
  height: 64px;
  display: block;
  border-radius: 14px;
}

.support-contact-text {
  font-size: 13px;
  font-weight: 700;
  color: #191919;
}

.widget-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Keywords List widget */
.popular-keywords-list {
  list-style: none;
}

.popular-keywords-list li {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
  font-size: 13px;
}

.popular-keywords-list li:last-child {
  border-bottom: none;
}

.popular-keywords-list .rank {
  font-weight: 700;
  width: 20px;
  color: var(--text-muted);
}

.popular-keywords-list li:nth-child(-n+3) .rank {
  color: var(--primary-color);
}

.popular-keywords-list .keyword {
  flex-grow: 1;
  color: var(--text-sub);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
}

.popular-keywords-list .keyword:hover {
  color: var(--primary-color);
}

.popular-keywords-empty {
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.popular-keywords-list .trend {
  display: flex;
  align-items: center;
  font-size: 11px;
}

.popular-keywords-list .trend.up {
  color: var(--primary-color);
}

.popular-keywords-list .trend.down {
  color: #228be6;
}

.popular-keywords-list .trend svg {
  width: 12px;
  height: 12px;
  stroke-width: 3px;
}

/* 홈: 실시간 인기검색 제품 — 5개까지 보이고 이후는 세로 스크롤 */
#home-popular-product-keywords-list {
  max-height: calc(5 * (1.4em + 16px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #ffffff #ffffff;
}

#home-popular-product-keywords-list::-webkit-scrollbar {
  width: 8px;
}

#home-popular-product-keywords-list::-webkit-scrollbar-track {
  background: #ffffff;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

#home-popular-product-keywords-list::-webkit-scrollbar-thumb {
  background: #ffffff;
  border: 1px solid #adb5bd;
  border-radius: 4px;
}

/* Topics list widget */
.popular-topics-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popular-topics-list li a,
.popular-topics-list li button.latest-post-link {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.popular-topics-list li a:hover,
.popular-topics-list li button.latest-post-link:hover {
  color: var(--primary-color);
}

.popular-topics-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* Home Feed list */
.feed-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pwa-install-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: auto;
  height: auto;
  min-width: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast, 0.15s ease);
  flex-shrink: 0;
  margin: 0 8px 0 0;
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.pwa-install-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(130, 188, 67, 0.25);
}

.pwa-install-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #82BC43;
  white-space: nowrap;
}

/* 마크 오른쪽 아래에 안내 문구 표시 */
.pwa-install-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  transform: translateY(-4px);
  width: max-content;
  max-width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: #212529;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.pwa-install-btn::before {
  content: '';
  position: absolute;
  top: calc(100% + 4px);
  right: 14px;
  left: auto;
  transform: none;
  border: 6px solid transparent;
  border-bottom-color: #212529;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}

.pwa-install-btn:hover::after,
.pwa-install-btn:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.pwa-install-btn:hover::before,
.pwa-install-btn:focus-visible::before {
  opacity: 1;
}

.pwa-install-btn[hidden] {
  display: none !important;
}

/* AI 업무도구: 친구에게 알려주기 플로팅 버튼 */
.home-share-fab {
  display: none;
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 990;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 24px);
  padding: 8px 12px;
  border: 1px solid rgba(130, 188, 67, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #5a8a2e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34, 34, 34, 0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body.mobile-post-detail-open .home-share-fab,
body.chat-room-open .home-share-fab,
.home-share-fab[hidden] {
  display: none !important;
}

.home-share-fab:hover {
  background: #f7fbf2;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.12);
}

.home-share-fab:active {
  transform: scale(0.98);
}

.home-share-fab-icon,
.home-share-fab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

.home-share-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2100;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(33, 37, 41, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.home-share-toast[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .home-share-fab {
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 10px);
    padding: 7px 11px;
    font-size: 11px;
  }

  body:has(#view-ai-work-tools.tab-view.active) .home-share-fab,
  body:has(#view-school-work-tools.tab-view.active) .home-share-fab {
    display: inline-flex;
    left: auto;
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 70px);
  }

  .home-share-toast {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 56px);
  }
}

.friend-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 2200;
}

.friend-share-sheet[hidden] {
  display: none !important;
}

.friend-share-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.friend-share-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}

.friend-share-sheet-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(130, 188, 67, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #5a8a2e;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.friend-share-sheet-action[hidden] {
  display: none !important;
}

.friend-share-sheet-close {
  border: 0;
  background: transparent;
  color: #868e96;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  cursor: pointer;
}

.pwa-ios-guide-modal-content {
  max-width: 420px;
}

.pwa-ios-guide-steps {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.7;
}

.pwa-ios-guide-steps[hidden] {
  display: none;
}

.pwa-ios-guide-steps li + li {
  margin-top: 10px;
}

#pwa-install-guide-copy p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 8px;
}

#pwa-install-guide-copy p:last-child {
  margin-bottom: 0;
}

#pwa-install-guide-copy .pwa-install-guide-link-wrap {
  margin-top: 12px;
}

#pwa-install-guide-copy .pwa-install-guide-link {
  color: var(--primary, #16a34a);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

.job-recent-feed-header {
  margin-top: 32px;
}

.feed-empty-message {
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 40px 12px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.feed-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-feed .feed-list {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 920px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
  gap: 6px;
}

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

.home-feed .feed-list::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 999px;
}

.home-feed .feed-list::-webkit-scrollbar-track {
  background: transparent;
}

.feed-post-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.feed-post-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.feed-post-card.has-thumb {
  padding: 12px 14px;
}

/* 카드 일반 영역 hover: 클릭하면 게시글 상세로 이동한다는 신호 */
.feed-post-card:hover {
  border-color: #ced4da;
  background-color: #f1f3f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.045);
}

/* 구인구직 최근 글: 호버 시 연한 회색 */
#view-reviews .feed-post-card:hover,
#job-recent-feed-list .feed-post-card:hover {
  background-color: #f1f3f5;
  border-color: #ced4da;
}

.home-feed .feed-post-card:hover {
  border-color: #ced4da;
  background-color: #f1f3f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 홈 피드 탭 */
.home-feed-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.home-feed-tab {
  position: relative;
  padding: 4px 4px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.home-feed-tab:hover {
  color: var(--text-main);
}

.home-feed-tab.active {
  color: var(--text-main);
}

.home-feed-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px 2px 0 0;
}

.home-feed-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.home-feed-more-btn {
  padding: 4px 2px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.home-feed-more-btn:hover {
  color: var(--text-muted);
}

.home-feed-intro {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.home-feed .feed-list.is-meal-photos {
  overflow: visible;
  max-height: none;
}

.home-meal-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-meal-photo-card {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f5;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-meal-photo-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.home-meal-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-feed .feed-list.is-meal-photos,
.home-feed .feed-list.is-field-latest {
  overflow: visible;
  max-height: none;
  padding-right: 0;
}

/* 홈 가운데: 분야별 최신글 */
.home-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-field-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: #ffffff;
}

.home-field-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  background: var(--badge-slate-bg);
}

.home-field-card[data-tone="mint"] .home-field-card-head { background: var(--badge-mint-bg); }
.home-field-card[data-tone="orange"] .home-field-card-head { background: var(--badge-orange-bg); }
.home-field-card[data-tone="sky"] .home-field-card-head { background: var(--badge-sky-bg); }
.home-field-card[data-tone="amber"] .home-field-card-head { background: var(--badge-amber-bg); }
.home-field-card[data-tone="pink"] .home-field-card-head { background: var(--badge-pink-bg); }
.home-field-card[data-tone="violet"] .home-field-card-head { background: var(--badge-violet-bg); }
.home-field-card[data-tone="green"] .home-field-card-head { background: var(--badge-green-bg); }
.home-field-card[data-tone="cyan"] .home-field-card-head { background: var(--badge-cyan-bg); }
.home-field-card[data-tone="rose"] .home-field-card-head { background: var(--badge-rose-bg); }

.home-field-card-body {
  padding: 12px 16px 14px;
  background: #ffffff;
}

.home-field-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: none;
  color: var(--badge-slate-fg);
}

.home-field-card[data-tone="mint"] .home-field-card-icon { color: var(--badge-mint-fg); }
.home-field-card[data-tone="orange"] .home-field-card-icon { color: var(--badge-orange-fg); }
.home-field-card[data-tone="sky"] .home-field-card-icon { color: var(--badge-sky-fg); }
.home-field-card[data-tone="amber"] .home-field-card-icon { color: var(--badge-amber-fg); }
.home-field-card[data-tone="pink"] .home-field-card-icon { color: var(--badge-pink-fg); }
.home-field-card[data-tone="violet"] .home-field-card-icon { color: var(--badge-violet-fg); }
.home-field-card[data-tone="green"] .home-field-card-icon { color: var(--badge-green-fg); }
.home-field-card[data-tone="cyan"] .home-field-card-icon { color: var(--badge-cyan-fg); }

.home-field-card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.1;
}

.home-field-card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-field-card-more {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  color: #adb5bd;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.home-field-card-more:hover {
  color: var(--text-sub);
}

.home-field-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-field-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
}

.home-field-card-post {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: inherit;
}

.home-field-card-field-tag {
  flex: 0 0 auto;
  max-width: 7.5em;
  padding: 0 5px;
  border-radius: 4px;
  background: #f1f3f5;
  color: #868e96;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-field-card-post-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-field-card-post:hover {
  color: var(--primary-color);
}

.home-field-card-date {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 400;
  color: #adb5bd;
  white-space: nowrap;
}

.home-field-card-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.home-field-card-login {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--secondary-color);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.home-field-card-login:hover {
  color: var(--secondary-hover);
}

/* 홈 피드(인기글/최신글/기관자료): 제목·작성일만 */
.home-feed .feed-header {
  margin-bottom: 10px;
}

.home-feed .feed-post-card.home-feed-compact {
  flex: 0 0 auto;
  align-self: stretch;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  overflow: hidden;
  transform: none;
  cursor: pointer;
}

.home-feed .feed-post-card.home-feed-compact:hover,
.home-feed .feed-post-card.home-feed-compact:active,
.home-feed .feed-post-card.home-feed-compact:focus-visible {
  transform: none;
}

.home-feed .feed-post-card.home-feed-compact .post-header {
  margin-bottom: 0;
  gap: 6px;
}

.home-feed .feed-post-card.home-feed-compact .post-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-feed .feed-post-card.home-feed-compact .post-header .post-date {
  margin: 0;
  font-size: inherit;
  color: var(--text-sub);
  white-space: nowrap;
  text-align: left;
}

/* 홈 미리보기(인기글/최신글/업무자료): 썸네일 예약 칸을 두지 않고 제목 한 줄 높이로 맞춤 */
.home-feed .feed-post-card.home-feed-compact:not(.has-thumb)::after {
  display: none;
  content: none;
  flex: 0 0 0;
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
}

.post-header {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.post-related-field {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #868e96;
  background: #f1f3f5;
}
.home-feed-compact .post-related-field {
  margin: 0 0 2px;
  font-size: 10px;
}
.channel-card.is-field-selected {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}
.community-field-channel-tabs {
  margin: 4px 0 8px;
}

.post-channel {
  font-weight: 700;
  color: var(--text-main);
  background: none;
  padding: 0 0 0 7px;
  border-radius: 0;
  border-left: 2.5px solid currentColor;
  line-height: 1.3;
}

.post-channel.icon-bubble,
.detail-channel-tag.icon-bubble,
.board-post-channel-tag.icon-bubble { color: #228be6; background: none; }
.post-channel.icon-menu-plan,
.detail-channel-tag.icon-menu-plan,
.board-post-channel-tag.icon-menu-plan { color: #2f9e44; background: none; }
.post-channel.icon-thumb,
.detail-channel-tag.icon-thumb,
.board-post-channel-tag.icon-thumb { color: #20c997; background: none; }
.post-channel.icon-public-org,
.detail-channel-tag.icon-public-org,
.board-post-channel-tag.icon-public-org { color: #f59f00; background: none; }
.post-channel.icon-policy,
.detail-channel-tag.icon-policy,
.board-post-channel-tag.icon-policy { color: #339af0; background: none; }
.post-channel.icon-school,
.detail-channel-tag.icon-school,
.board-post-channel-tag.icon-school { color: #4c6ef5; background: none; }
.post-channel.icon-document,
.detail-channel-tag.icon-document,
.board-post-channel-tag.icon-document { color: #15aabf; background: none; }
.post-channel.icon-region-portal,
.detail-channel-tag.icon-region-portal,
.board-post-channel-tag.icon-region-portal { color: #e64980; background: none; }
.post-channel.icon-folder,
.detail-channel-tag.icon-folder,
.board-post-channel-tag.icon-folder { color: #fab005; background: none; }
.post-channel.icon-job-teacher,
.detail-channel-tag.icon-job-teacher,
.board-post-channel-tag.icon-job-teacher { color: #1971c2; background: none; }
.post-channel.icon-job-teacher-seek,
.detail-channel-tag.icon-job-teacher-seek,
.board-post-channel-tag.icon-job-teacher-seek { color: #0ca678; background: none; }
.post-channel.icon-job-cook,
.detail-channel-tag.icon-job-cook,
.board-post-channel-tag.icon-job-cook { color: #f08c00; background: none; }
.post-channel.icon-job-cook-seek,
.detail-channel-tag.icon-job-cook-seek,
.board-post-channel-tag.icon-job-cook-seek { color: #d6336c; background: none; }
.post-channel.icon-job-office,
.detail-channel-tag.icon-job-office,
.board-post-channel-tag.icon-job-office { color: #7048e8; background: none; }
.post-channel.icon-job-share,
.detail-channel-tag.icon-job-share,
.board-post-channel-tag.icon-job-share { color: #e8590c; background: none; }

.post-channel,
.post-channel[class*="icon-"],
.detail-channel-tag,
.detail-channel-tag[class*="icon-"] {
  color: #205b4c;
  background: rgba(32, 91, 76, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
  line-height: 1.4;
}

.post-channel.icon-bubble,
.detail-channel-tag.icon-bubble,
.board-post-channel-tag.icon-bubble {
  background-color: var(--badge-sky-bg);
  color: var(--badge-sky-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.post-channel.icon-menu-plan,
.detail-channel-tag.icon-menu-plan,
.board-post-channel-tag.icon-menu-plan {
  background-color: var(--badge-workchat-bg);
  color: var(--badge-workchat-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.post-channel.icon-thumb,
.detail-channel-tag.icon-thumb,
.board-post-channel-tag.icon-thumb {
  background-color: var(--badge-pink-bg);
  color: var(--badge-pink-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.post-channel.icon-public-org,
.detail-channel-tag.icon-public-org,
.board-post-channel-tag.icon-public-org {
  background-color: var(--badge-rose-bg);
  color: var(--badge-rose-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.post-author {
  font-weight: 500;
  color: var(--text-sub);
}

.post-date {
  color: var(--text-muted);
  margin-left: 0;
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: auto;
}

.post-header .post-date {
  margin-left: 0;
  margin-top: 0;
  display: inline;
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-sub);
  font-size: inherit;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid #f8f9fa;
  padding-top: 8px;
}

.post-footer .post-date {
  margin-left: auto;
  margin-top: 0;
  display: inline-block;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.write-title-input,
.post-title,
.board-post-title,
.detail-title-row .view-title,
.home-field-card-post-title,
.latest-post-link,
.job-region-post-title {
  font-family: var(--font-kor), "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.post-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

mark.search-title-highlight {
  background-color: #fff3a3;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.post-body-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 8px;
  min-width: 0;
}

.post-body-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-body-text .post-content {
  flex: 0 1 auto;
  margin-bottom: 8px;
}

.feed-post-thumb {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 120px;
  height: 120px;
  margin: 0;
  align-self: center;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-post-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #ffffff;
}

.feed-post-thumb.is-broken {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
}

/* 사진 없는 카드도 썸네일 칸을 예약해 작성일·본문 폭을 사진 있는 카드와 맞춘다 */
.feed-post-card:not(.has-thumb)::after {
  content: '';
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  margin: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 교육자료·노하우: 오른쪽 썸네일(OG 또는 기본) */
#community-filter-posts-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
#community-channel-board-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
#home-feed-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
.edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb {
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  align-self: center;
  border-radius: 10px;
  margin: 0;
}

.edu-materials-card .edu-default-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e6fcf5 0%, #f1f3f5 100%);
  border: 1px solid #c3fae8;
}

.edu-materials-card .edu-default-thumb svg {
  width: 42px;
  height: 42px;
}

.edu-materials-card .edu-source-line {
  color: var(--text-muted);
  font-size: 12.5px;
}

.edu-materials-card .edu-source-open {
  color: var(--secondary-color);
  font-weight: 600;
  cursor: pointer;
  padding: 1px 4px;
  margin: 0 -2px;
  border-radius: 5px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.edu-materials-card .edu-source-open::after {
  content: '↗';
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

.edu-materials-card .edu-source-open:hover {
  color: #0ca678;
  background-color: rgba(18, 184, 134, 0.14);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.edu-materials-card .edu-source-open:hover::after {
  transform: translate(1px, -1px);
}

/* 외부 원문으로 이동하는 썸네일: 일반 대표 이미지와 구분되도록 표시 */
.feed-post-thumb.is-external-thumb {
  position: relative;
  cursor: pointer;
}

/* 모바일에는 hover가 없으므로 ↗ 배지를 상시 노출한다 */
.external-thumb-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(33, 37, 41, 0.72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.external-thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.external-thumb-overlay-text {
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-align: center;
  padding: 0 4px;
}

@media (hover: hover) {
  .feed-post-thumb.is-external-thumb:hover .external-thumb-overlay {
    opacity: 1;
  }

  .feed-post-thumb.is-external-thumb:hover .external-thumb-badge {
    opacity: 0;
  }

  /* 교육자료 카드의 제목도 외부 원문으로 이동하므로 같은 힌트를 준다 */
  .edu-materials-card[data-source-url] .post-title:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .edu-materials-card[data-source-url] .post-title:hover::after {
    content: '↗';
    margin-left: 3px;
    font-size: 0.9em;
  }
}

.write-edu-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8f9fa;
}

.write-edu-preview[hidden] {
  display: none !important;
}

.write-edu-preview-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.write-edu-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.write-edu-preview-thumb .edu-default-thumb {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.write-edu-preview-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.write-edu-preview-site {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.write-edu-preview-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.write-edu-preview-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  #community-filter-posts-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
  #community-channel-board-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
  #home-feed-list .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb,
  .edu-materials-card.has-thumb .feed-post-thumb.edu-materials-thumb {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 8px;
  }

  .edu-materials-card .edu-default-thumb svg {
    width: 32px;
    height: 32px;
  }

  .external-thumb-badge {
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    font-size: 10px;
  }

  .external-thumb-overlay-text {
    font-size: 10px;
  }
}

.post-content {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.feed-post-card.has-thumb .post-content {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}


.board-post-preview {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.board-post-preview-text {
  flex: 1 1 auto;
  min-width: 0;
}

.board-post-thumb {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #ffffff;
}

.board-post-thumb.is-broken {
  display: none;
}

.board-post-preview.has-thumb .board-post-excerpt {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.post-stat[hidden],
.detail-like-btn[hidden],
.detail-comment-focus-btn[hidden],
.detail-rating-stat[hidden] {
  display: none !important;
}

.feed-like-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.feed-like-btn.liked,
.feed-like-btn.liked .feed-like-count {
  color: #7b8494;
}

.feed-like-btn.liked svg {
  fill: currentColor;
}

.post-stat .feed-like-count,
.post-stat .feed-comment-count,
.post-stat .feed-view-count {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.post-stat svg,
.post-stat i {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.post-stat-like,
.detail-like-btn {
  color: #7b8494;
}

.post-stat-comment,
.detail-comment-focus-btn {
  color: #7b8494;
}

.post-stat-view,
.detail-view-stat {
  color: #7b8494;
}

/* Sidebar Right Promo */
.promo-card {
  height: 180px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.promo-content {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.45);
}

.ad-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.promo-content h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.promo-content p {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 12px;
  line-height: 1.3;
}

.promo-btn {
  background-color: var(--secondary-color);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  border-radius: 14px;
  width: 100%;
}

.promo-btn:hover {
  background-color: var(--secondary-hover);
}

/* 홈 우측: 전국 영양사 커뮤니티(누티) CTA */
.nutie-cta-card {
  background: linear-gradient(165deg, #ffffff 0%, #f4fbf9 100%);
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
  border-radius: 14px;
  padding: 18px 16px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nutie-cta-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.nutie-cta-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.nutie-cta-card__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #0b7a55;
}

.nutie-cta-card__visual {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.nutie-cta-card__salad {
  width: 56px;
  height: 56px;
  display: block;
}

.nutie-cta-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #000000;
  word-break: keep-all;
}

.nutie-cta-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  background-color: var(--secondary-color);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nutie-cta-card__btn:hover {
  background-color: var(--secondary-hover);
  color: #ffffff;
}

.nutie-cta-card__btn:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Recommended Channels Right Sidebar */
.recommended-channels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rec-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f2f4f6;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rec-icon svg {
  width: 16px;
  height: 16px;
}

.rec-info {
  flex-grow: 1;
  min-width: 0;
}

.rec-info h5 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-info p {
  font-size: 10px;
  color: var(--text-muted);
}

.follow-btn {
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.follow-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* ==========================================================================
   VIEW: REVIEWS (School Reviews Layout & Cards)
   ========================================================================== */
.review-search-container {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.review-search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ced4da;
  border-radius: 24px;
  height: 48px;
  padding: 0 16px 0 20px;
  background-color: #ffffff;
}

.review-search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.review-search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  margin-right: 10px;
}

.review-search-box input {
  border: none;
  background: transparent;
  flex-grow: 1;
  font-size: 14px;
  font-weight: 500;
}

.review-search-btn {
  background-color: var(--text-main);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  border-radius: 18px;
  padding: 0 20px;
}

.review-search-btn:hover {
  background-color: #000000;
}

/* Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #f8f9fa;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.school-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.school-region {
  font-size: 12px;
  color: var(--text-muted);
}

.total-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.total-rating .stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.star-filled {
  fill: #ffc107;
  color: #ffc107;
  width: 16px;
  height: 16px;
}

.rating-txt {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary-color);
  background-color: rgba(18, 184, 134, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.rating-txt.bad {
  color: var(--primary-color);
  background-color: rgba(255, 75, 75, 0.08);
}

/* Review details scores */
.review-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin-bottom: 20px;
  background-color: #f8f9fa;
  padding: 12px 16px;
  border-radius: 8px;
}

.score-item {
  display: flex;
  align-items: center;
  font-size: 12px;
}

.score-label {
  width: 70px;
  font-weight: 600;
  color: var(--text-sub);
}

.score-bar {
  flex-grow: 1;
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 12px;
}

.score-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.score-val {
  width: 20px;
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
}

.review-content .review-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.review-content .review-body {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 16px;
}

.review-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   VIEW: PRODUCT INFO (게시판 - 글쓰기 & 목록)
   ========================================================================== */
.board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.board-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}

.board-header-actions .header-search {
  flex: 0 1 280px;
  width: 280px;
  max-width: 280px;
  margin: 0;
  min-width: 0;
}

.board-header-actions .header-search .search-input-wrapper {
  width: 100%;
}

.board-header-actions .write-btn {
  flex-shrink: 0;
  margin-top: 0;
}

/* 게시판 검색창: 제품조회와 동일하게 헤더 가운데 + 흰 배경/테두리/호버 */
.board-header-with-search {
  position: relative;
  align-items: flex-start;
}

.board-header-with-search > .write-btn {
  flex-shrink: 0;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.board-centered-search {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 280px));
  max-width: 420px;
  margin: 0;
  z-index: 1;
}

.board-centered-search .search-input-wrapper {
  width: 100%;
  background-color: #ffffff;
  border-color: var(--border-color);
}

.board-centered-search .search-input-wrapper:hover,
.board-centered-search .search-input-wrapper:focus-within {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.board-header .view-title,
.board-header .view-subtitle {
  margin-bottom: 0;
}

.detail-title-block {
  min-width: 0;
  flex: 1;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  width: 100%;
  min-width: 0;
}

.detail-title-row .view-title {
  margin: 0;
  min-width: 0;
}

.detail-title-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 0;
  line-height: 1;
}

.detail-title-rating[hidden] {
  display: none !important;
}

.detail-title-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f5c518;
  font-size: 20px;
  line-height: 1;
}

.detail-title-rating-stars .is-empty {
  color: #d7dbe3;
}

.detail-title-rating-stars .star-icon-svg {
  width: 1em;
  height: 1em;
  vertical-align: 0;
}

.detail-title-rating-avg {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.board-header .view-subtitle {
  margin-top: 6px;
}

.board-header .write-btn {
  flex-shrink: 0;
  margin-top: 2px;
}

.product-lookup-header-main {
  flex: 1;
  min-width: 0;
}

.product-lookup-header-main .view-subtitle {
  line-height: 1.6;
  word-break: keep-all;
}

#view-product-search .product-lookup-board-header {
  position: relative;
  align-items: flex-start;
}

#view-product-search .product-lookup-search {
  width: min(420px, calc(100% - 200px));
  max-width: 420px;
  margin: 0;
}

#view-product-search .product-lookup-search .search-input-wrapper {
  background-color: #ffffff;
  border-color: var(--border-color);
}

#view-product-search .product-lookup-search .search-input-wrapper:hover,
#view-product-search .product-lookup-search .search-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

/* 식재료조회: 소개글 없이 검색행과 정렬/목록 간격만 유지 */
#view-product-search .vendor-hub-list-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0 0 16px;
}

#view-product-search .vendor-hub-list-head .vendor-hub-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  min-height: 50px;
}

#view-product-search .vendor-hub-list-head .vendor-hub-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

#view-product-search .vendor-hub-list-head .header-search,
#view-product-search .vendor-hub-list-head .product-lookup-search {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 1;
  flex: none;
  width: min(420px, calc(100% - 200px));
  max-width: 420px;
  margin: 0;
  min-width: 0;
}

#view-product-search .vendor-hub-list-head .write-btn {
  display: inline-flex;
  flex-shrink: 0;
  margin: 0;
}

#view-product-search .vendor-hub-list-head + .product-lookup-admin-actions,
#view-product-search .product-lookup-table-wrap,
#view-product-search .product-lookup-card-list {
  margin-top: 0;
}

.board-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-title-row .view-title {
  margin-bottom: 0;
}

.board-title-row .write-btn {
  flex-shrink: 0;
}

.board-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition-fast);
}

.board-back-btn:hover {
  color: var(--primary-color);
}

.board-back-btn i {
  width: 16px;
  height: 16px;
}

.detail-nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
}

.detail-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f2f2f2;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.detail-nav-btn:hover {
  background: #e6e6e6;
  color: #222;
}

.detail-nav-btn i {
  width: 14px;
  height: 14px;
}

.detail-nav-btn[hidden] {
  display: none !important;
}

/* Post Detail Page (게시글 상세 페이지) */
.post-detail-card {
  margin-top: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* 본문이 짧아도 카드를 늘리지 않는다 (본문 아래 빈 공간 방지) */
#view-post-detail .detail-content {
  max-height: none;
  flex: 0 0 auto;
  min-height: 0;
  margin-bottom: 12px;
}

/* 첨부 사진이 본문 위에 있을 때 글·사진 사이 빈 공간을 줄인다 */
#view-post-detail .detail-images:not([hidden]) + .detail-content {
  flex: 0 0 auto;
  min-height: 0;
  margin-top: 0;
}

#view-post-detail .detail-content:has(~ .detail-attachments:not([hidden])) {
  flex: 0 0 auto;
  min-height: 0;
  margin-bottom: 8px;
}

#view-post-detail .detail-stats {
  margin-top: 0;
  padding-top: 12px;
}

.detail-latest-posts {
  margin-top: 28px;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}

.detail-latest-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.detail-latest-table {
  margin-top: 0;
}

/* Write Post Page (전체 화면 글쓰기) */
#view-write-post .board-header,
#view-product-info-write .board-header,
#view-product-register .board-header,
#view-job-write .board-header {
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.write-page-card {
  margin: 8px auto 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 720px;
  width: 100%;
}

.write-page-form {
  width: 100%;
}

.form-hint {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
}

.product-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.product-spec-row input[type="number"] {
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 14px;
  font-size: 13.5px;
}

.product-spec-row select {
  flex: 0 0 88px;
  width: 88px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 10px;
  font-size: 13.5px;
  background-color: #ffffff;
}

.product-spec-row input[type="number"]:focus,
.product-spec-row select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.product-allergy-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.product-allergy-chip {
  appearance: none;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-sub);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-allergy-chip:hover {
  background: rgba(255, 75, 75, 0.06);
  border-color: rgba(255, 75, 75, 0.35);
  color: var(--text-main);
}

.product-allergy-chip.is-selected {
  background: rgba(255, 75, 75, 0.12);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

.product-origin-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-origin-option {
  appearance: none;
  min-width: 96px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-sub);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-origin-option:hover {
  background: rgba(255, 75, 75, 0.06);
  border-color: rgba(255, 75, 75, 0.35);
  color: var(--text-main);
}

.product-origin-option.is-selected {
  background: rgba(255, 75, 75, 0.12);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

.product-excel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafbfc;
}

.product-excel-toolbar-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product-excel-toolbar-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.product-excel-toolbar-text span {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.45;
}

.product-excel-actions {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .write-page-card {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .product-spec-row {
    gap: 6px;
  }

  .product-spec-row select {
    flex: 0 0 76px;
    width: 76px;
    padding: 0 8px;
  }

  .product-allergy-chip {
    padding: 7px 10px;
    font-size: 12.5px;
  }

  .product-excel-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .product-excel-actions {
    flex-wrap: wrap;
  }
}

/* Channel Detail (게시판 소개 페이지) */
.channel-detail-card {
  margin-top: 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 22px;
}

.channel-detail-card .detail-channel-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0 0 0 7px;
  font-size: 11px;
}

.channel-detail-intro {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-sub);
  white-space: pre-wrap;
  word-break: keep-all;
  margin: 0;
}

.channel-org-link-section {
  margin-top: 20px;
}

.channel-org-link-section[hidden] {
  display: none !important;
}

/* 기관 우수자료: 검색 + 분류 필터 */
.channel-board-tools {
  margin-top: 16px;
  margin-bottom: 4px;
}

.channel-board-tools[hidden] {
  display: none !important;
}

.channel-board-search {
  max-width: 420px;
  margin: 0 0 12px;
}

.channel-board-search .search-input-wrapper {
  width: 100%;
}

.channel-board-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.channel-board-category-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0 2px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.channel-board-category-tab:hover {
  color: var(--text-main);
}

.channel-board-category-tab.active {
  color: var(--primary-color);
  font-weight: 700;
}

.channel-board-category-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: var(--primary-color);
}

.channel-org-link-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.channel-org-link-grid {
  margin-top: 0;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.board-table.community-board-table {
  table-layout: fixed;
}

.board-table thead th {
  background-color: #f8f9fa;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
}

/* 커뮤니티 게시판 헤더: 약간 더 진한 회색 */
.community-board-table:not(.product-info-board-table) thead th {
  background-color: #e9ecef;
}

.board-table .board-col-title {
  text-align: left;
  padding-left: 20px;
}

.board-table tbody td {
  padding: 14px 12px;
  font-size: 13.5px;
  color: var(--text-sub);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.board-table tbody tr:last-child td {
  border-bottom: none;
}

.board-table tbody tr:not(.board-empty-row):hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

.board-table .board-post-title {
  text-align: left;
  padding-left: 20px;
  color: var(--text-main);
  font-weight: 600;
}

.board-view-count,
.board-comment-count {
  margin-left: 6px;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 12.5px;
}

.board-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  transition: var(--transition-fast);
}

.board-like-btn:hover {
  color: #7b8494;
}

.board-like-btn i,
.board-like-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.board-like-btn.liked {
  color: #7b8494;
  cursor: default;
}

.board-like-btn.liked svg {
  fill: currentColor;
}

.board-post-stat-group .board-like-btn:hover {
  background: none;
  color: #7b8494;
}

.board-post-stat-group .board-like-btn.liked {
  background: none;
}

.board-table .board-empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 12px;
}

.channel-intro-card {
  margin-top: 8px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: keep-all;
}

.community-board-table .board-col-author {
  /* 제목 칸이 약 1.5배 넓어지도록 작성자 칸을 줄인다 */
  width: calc((240px + 7em) / 1.5);
  min-width: calc((240px + 7em) / 1.5);
  max-width: calc((240px + 7em) / 1.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

.community-board-table:not(.product-info-board-table) .board-col-title,
.community-board-table:not(.product-info-board-table) .board-col-author {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.product-info-board-table .board-col-title,
.product-info-board-table .board-col-author {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.community-board-table .board-col-date {
  /* 제목 확장 후에도 '2026. 8. 2.'가 한 줄로 들어가도록 약간 넓힌다 */
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  white-space: nowrap;
}

.board-table .board-col-author {
  width: calc((240px + 7em) / 1.5);
  min-width: calc((240px + 7em) / 1.5);
  max-width: calc((240px + 7em) / 1.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

.community-board-table .board-col-stats {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  white-space: nowrap;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
  box-sizing: border-box;
}

.board-stats-head {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
  width: auto;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  justify-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
  box-sizing: border-box;
}

.board-stats-head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  text-align: center;
}

.product-info-board-table .board-col-stats {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
  box-sizing: border-box;
}

.product-info-board-table .board-stats-head,
.product-info-board-table .board-post-stat-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  justify-items: center;
  gap: 2px;
  width: 100%;
  margin: 0;
}

.product-info-board-table .board-stats-head > span {
  width: 100%;
  justify-content: center;
  font-size: 11.5px;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.product-info-board-table .board-post-stat,
.product-info-board-table .board-post-stat-group .board-like-btn {
  width: 100%;
  grid-template-columns: auto auto;
  column-gap: 2px;
  justify-content: center;
  justify-items: center;
}

.product-info-board-table .board-post-stat > span {
  min-width: 0;
  text-align: center;
}

.product-info-board-table .board-post-stat i,
.product-info-board-table .board-post-stat svg {
  width: 14px;
  height: 14px;
}

.product-info-board-table tbody td.board-post-stats {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  padding-left: 2px;
  padding-right: 2px;
}

.product-info-board-table .board-col-date {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  white-space: nowrap;
}

.product-info-board-table tbody td.board-post-meta:nth-child(4) {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  box-sizing: border-box;
}

.product-info-board-table .board-post-cell-inner {
  display: block;
  min-width: 0;
}

.product-info-board-table .board-post-text {
  min-width: 0;
}

.product-info-board-table .board-post-title {
  font-family: var(--font-kor);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text-main);
}

.product-info-board-table .board-post-excerpt {
  font-family: var(--font-kor);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.product-info-board-table tr.has-thumb .board-post-excerpt {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.product-info-board-table tbody td.board-post-meta {
  font-family: var(--font-kor);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-sub);
}

.product-info-board-table .board-col-thumb,
.product-info-board-table tbody td.board-post-thumb-cell {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  padding: 12px 12px 12px 8px;
  vertical-align: middle;
  text-align: right;
}

.product-info-board-table .board-post-thumb {
  margin-left: auto;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info-board-table .board-post-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  display: block;
  background: #ffffff;
}

.product-info-board-table .board-post-thumb.is-broken {
  display: none;
}

/* 앱(모바일): 제목 + 오른쪽 썸네일만 보이게 */
@media (max-width: 768px) {
  .product-info-board-table .board-col-author,
  .product-info-board-table .board-col-date,
  .product-info-board-table .board-col-stats,
  .product-info-board-table tbody td.board-post-meta,
  .product-info-board-table tbody td.board-post-stats {
    display: none;
  }

  .product-info-board-table .board-col-title,
  .product-info-board-table tbody td.board-post-cell {
    width: auto;
    max-width: none;
  }

  .product-info-board-table .board-col-thumb,
  .product-info-board-table tbody td.board-post-thumb-cell {
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    padding: 12px 12px 12px 4px;
  }

  .product-info-board-table .board-post-thumb {
    width: 72px;
    height: 72px;
  }

  .product-info-board-table thead th.board-col-title {
    text-align: left;
    padding-left: 16px;
  }
}

.community-board-table tbody td.board-post-cell {
  text-align: left;
  padding: 16px 20px;
  vertical-align: top;
}

.community-board-table .board-post-title {
  text-align: left;
  padding: 0;
  color: var(--text-main);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.board-post-channel-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 0 0 0 7px;
  border-radius: 0;
  background: none;
  border-left: 2.5px solid currentColor;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.3;
}

.board-post-channel-tag.icon-bubble {
  background-color: var(--badge-sky-bg);
  color: var(--badge-sky-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.board-post-channel-tag.icon-menu-plan {
  background-color: var(--badge-workchat-bg);
  color: var(--badge-workchat-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.board-post-channel-tag.icon-thumb {
  background-color: var(--badge-pink-bg);
  color: var(--badge-pink-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.board-post-channel-tag.icon-public-org {
  background-color: var(--badge-rose-bg);
  color: var(--badge-rose-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.board-post-notice-badge,
.detail-notice-badge,
.feed-notice-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e03131;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.4;
}

.board-post-prefix-badge,
.detail-prefix-badge,
.feed-prefix-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(32, 91, 76, 0.12);
  color: #205b4c;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.4;
}

.detail-notice-badge {
  font-size: 13px;
  margin-right: 10px;
}

.detail-prefix-badge {
  font-size: 13px;
  margin-right: 10px;
}

.feed-notice-badge {
  margin-right: 6px;
}

/* 채용 공고 마감 표시 (나라일터 자동 마감) — 공지·말머리 배지와 같은 모양, 회색 톤 */
.board-post-closed-badge,
.detail-closed-badge,
.feed-closed-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #868e96;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.4;
}

.detail-closed-badge {
  font-size: 13px;
  margin-right: 10px;
}

.feed-closed-badge {
  margin-right: 6px;
}

.feed-post-card.is-closed .post-title,
.job-region-list-row.is-closed .job-region-post-title,
.job-region-post.is-closed .job-region-post-title {
  color: #868e96;
}

.community-v2-notice-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 1px 7px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.feed-prefix-badge {
  margin-right: 6px;
}

.board-table tr.board-notice-row {
  background: rgba(224, 49, 49, 0.04);
}

.board-table tr.board-notice-row:hover {
  background: rgba(224, 49, 49, 0.08);
}

.write-notice-option {
  margin-top: 4px;
}

.write-notice-option .agreement-checkbox-row {
  font-weight: 600;
}

.community-board-table .board-post-excerpt {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.community-board-table .board-post-preview.has-thumb .board-post-excerpt {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.community-board-table tbody td.board-post-meta {
  vertical-align: top;
  padding-top: 16px;
}

/* 급식피드: 급식유형·학교급 태그 */
.meal-feed-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.meal-feed-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background-color: #fff0f0;
  color: var(--primary-color);
  white-space: nowrap;
}

.meal-feed-tag.meal-feed-tag-school {
  background-color: #e7f5ff;
  color: #228be6;
}

.detail-meal-feed-badges {
  margin-bottom: 0;
}


/* 급식피드: 카테고리 탭 */
.meal-feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 12px 0 20px;
  border-bottom: 1px solid var(--border-color);
}

.meal-feed-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0 2px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-feed-tab:hover {
  color: var(--text-main);
}

.meal-feed-tab.active {
  color: var(--primary-color);
  font-weight: 700;
}

.meal-feed-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: var(--primary-color);
}

/* 급식피드: 사진 중심 카드형 피드 */
.meal-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.meal-feed-grid > .feed-empty-message {
  grid-column: 1 / -1;
}

.meal-feed-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-feed-card:hover {
  border-color: #ced4da;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.meal-feed-card.company-news-reader-locked,
.meal-feed-card.company-news-reader-locked .meal-feed-card-title,
.meal-feed-card.company-news-reader-locked .meal-feed-card-body,
.meal-feed-card.company-news-reader-locked .meal-feed-card-title.is-static-title {
  cursor: default;
}

.meal-feed-card.company-news-reader-locked .meal-feed-card-title {
  color: inherit;
  text-decoration: none;
}

.meal-feed-card.company-news-reader-locked:hover {
  transform: none;
}

.meal-feed-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #f1f3f5;
  overflow: hidden;
}

.meal-feed-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.meal-feed-card-thumb-wrap[data-thumb-kind="pdf"] {
  background-color: #f4f5f6;
  border-radius: 0;
  padding: 0;
}
.meal-feed-pdf-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #f6f7f8;
  overflow: hidden;
  border-radius: 0;
}
.meal-feed-pdf-thumb-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  display: block;
  border-radius: 0;
}
.meal-feed-pdf-thumb-skel {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ececee 0%, #f7f7f8 50%, #ececee 100%);
  background-size: 200% 100%;
  animation: meal-feed-pdf-skel 1.1s ease-in-out infinite;
}
@keyframes meal-feed-pdf-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.meal-feed-pdf-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  background: #f6f7f8;
  color: #495057;
}
.meal-feed-pdf-thumb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #e03131;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.meal-feed-pdf-thumb-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 90%;
  word-break: break-word;
}
.meal-feed-pdf-thumb-hint {
  font-size: 11px;
  color: #868e96;
}
.meal-feed-pdf-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  top: auto;
  right: auto;
  inset: auto;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  max-width: max-content;
  max-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.meal-feed-newsletter-hover-hint {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.2px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

@media (hover: hover) {
  .meal-feed-card-thumb-wrap:hover > .meal-feed-newsletter-hover-hint {
    opacity: 1;
  }

  .meal-feed-card-thumb-wrap:hover:has(.meal-feed-card-favorite-btn:hover) > .meal-feed-newsletter-hover-hint {
    opacity: 0;
  }
}

.meal-feed-card-thumb-wrap .meal-feed-card-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.meal-feed-card-thumb-wrap .meal-feed-card-thumb-empty i {
  width: 32px;
  height: 32px;
  stroke-width: 1.5px;
}

.meal-feed-card-thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
}

.meal-feed-card-thumb-video span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.meal-feed-card-thumb-video.is-youtube {
  background: #1a1a1a;
}

.meal-feed-card-thumb-video i,
.meal-feed-card-thumb-video svg {
  width: 36px;
  height: 36px;
}

.meal-feed-card-video-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.meal-feed-card-video-badge i,
.meal-feed-card-video-badge svg {
  width: 12px;
  height: 12px;
}

.meal-feed-card-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #c5c9d1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: var(--transition-fast);
}

.meal-feed-card-favorite-btn:hover {
  color: #f5c518;
  background: #ffffff;
}

.meal-feed-card-favorite-btn.favorited {
  color: #f5c518;
}

.meal-feed-card-favorite-btn.favorited svg {
  fill: currentColor;
}

.meal-feed-card-favorite-btn i,
.meal-feed-card-favorite-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

.meal-feed-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 8px;
}

.meal-feed-card-body .meal-feed-tag-list {
  margin-bottom: 0;
}

.meal-feed-card-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meal-feed-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.meal-feed-card-author {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
}

.meal-feed-card-author-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-feed-card-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.meal-feed-card-author .nanum-grade,
.meal-feed-card-author .share-badge {
  flex-shrink: 0;
}

.meal-feed-card-promo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  flex-shrink: 0;
}

.meal-feed-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
}

.meal-feed-promo-link.is-compact {
  width: 18px;
  height: 18px;
  justify-content: center;
  gap: 0;
}

.meal-feed-promo-link:hover {
  text-decoration: none;
  opacity: 0.88;
}

.meal-feed-ig-svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.meal-feed-promo-link.is-compact .meal-feed-ig-svg {
  width: 14px;
  height: 14px;
}

.meal-feed-promo-link i,
.meal-feed-promo-link svg:not(.meal-feed-ig-svg) {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #3d8b4a;
}

.meal-feed-promo-label {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.meal-feed-promo-extra {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.detail-promo-links {
  margin: 16px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--border, #e6e9ef);
  border-radius: 12px;
  background: #fafbfc;
}

.detail-promo-links-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.detail-promo-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.detail-promo-links .meal-feed-promo-link {
  width: 100%;
}

@media (max-width: 768px) {
  .detail-promo-links {
    padding: 12px 12px;
  }

  .detail-promo-links .meal-feed-promo-link {
    flex-wrap: wrap;
  }
}

.meal-feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  color: #7b8494;
}

.meal-feed-card-footer .meal-feed-card-stats {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.meal-feed-card-footer .meal-feed-card-stats span,
.meal-feed-card-footer .meal-feed-card-stats .meal-feed-like-btn,
.meal-feed-card-footer .meal-feed-card-stats .meal-feed-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.meal-feed-card-footer .meal-feed-like-btn,
.meal-feed-card-footer .meal-feed-share-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: #7b8494;
  line-height: 1;
}

.meal-feed-card-footer .meal-feed-share-btn {
  flex-shrink: 0;
}

.meal-feed-card-footer .meal-feed-like-btn.liked,
.meal-feed-card-footer .meal-feed-like-btn.liked .meal-feed-like-count {
  color: #7b8494;
}

.meal-feed-card-footer .meal-feed-like-btn.liked svg {
  fill: currentColor;
}

.meal-feed-card-footer .meal-feed-card-stats i,
.meal-feed-card-footer .meal-feed-card-stats svg {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* 급식피드: 페이지네이션 */
.meal-feed-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.meal-feed-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.meal-feed-page-btn:hover:not(:disabled) {
  border-color: #ced4da;
  color: var(--text-main);
}

.meal-feed-page-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.meal-feed-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.meal-feed-page-btn i {
  width: 15px;
  height: 15px;
}

/* 급식피드 글쓰기: 사진 여러 장 업로드 + 순서변경 + 대표이미지 */
.meal-feed-photo-preview-list .write-photo-preview-item {
  width: 104px;
  height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 10px;
  background-color: #f8f9fa;
}

.meal-feed-photo-preview-list .write-photo-preview-item img {
  width: 104px;
  height: 78px;
  max-width: 104px;
  max-height: 78px;
  object-fit: cover;
}

.meal-feed-photo-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 1;
}

.meal-feed-photo-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px;
  gap: 4px;
}

.meal-feed-photo-move-btn {
  flex: 1 1 0;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.meal-feed-photo-move-btn:hover:not(:disabled) {
  border-color: #ced4da;
  color: var(--text-main);
}

.meal-feed-photo-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.meal-feed-photo-move-btn i {
  width: 13px;
  height: 13px;
}

.meal-feed-write-tools {
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.meal-feed-write-tools .write-tool-btn {
  flex: 0 1 auto;
  white-space: nowrap;
}

.meal-feed-write-tools .write-tool-btn i,
.meal-feed-write-tools .write-tool-btn svg,
.meal-feed-write-tools .write-tool-btn .meal-feed-write-tool-icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .meal-feed-write-tools {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    max-width: 100%;
  }

  .meal-feed-write-tools .write-tool-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    padding: 0 6px;
    font-size: 11px;
    gap: 4px;
    justify-content: center;
  }

  .meal-feed-write-tools .write-tool-btn i,
  .meal-feed-write-tools .write-tool-btn svg,
  .meal-feed-write-tools .write-tool-btn .meal-feed-write-tool-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
  }
}

.meal-feed-sns-attach {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
}

.meal-feed-sns-attach-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.meal-feed-sns-attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meal-feed-sns-attach-row input {
  flex: 1 1 180px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  font-size: 13px;
}

.meal-feed-sns-attach-error {
  margin-top: 8px;
  color: var(--primary-color);
}

.meal-feed-sns-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}

.meal-feed-sns-chip[hidden] {
  display: none !important;
}

.meal-feed-sns-chip > i,
.meal-feed-sns-chip > svg,
.meal-feed-sns-chip > span svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-sub);
  display: block;
}

.meal-feed-sns-chip-text {
  flex: 1;
  min-width: 0;
}

.meal-feed-sns-chip-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-feed-sns-chip-url {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-feed-sns-chip-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.meal-feed-sns-chip-remove:hover {
  background: rgba(255, 75, 75, 0.08);
  color: var(--primary-color);
}

.meal-feed-sns-chip-remove i,
.meal-feed-sns-chip-remove svg {
  width: 14px;
  height: 14px;
}

/* 급식피드 글쓰기: 등록/취소 버튼 */
.meal-feed-write-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.meal-feed-write-actions .submit-btn {
  flex: 1 1 0;
  margin-top: 0;
}

.meal-feed-cancel-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-feed-cancel-btn:hover {
  border-color: #ced4da;
  color: var(--text-main);
}

@media (max-width: 1024px) {
  .meal-feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .meal-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* 모바일 급식피드만 Instagram형 단일 열 스트림으로 표시 */
  #view-meal-feed .meal-feed-grid { display: flex; flex-direction: column; width: 100%; max-width: 100%; gap: 12px; margin-inline: 0; overflow-x: hidden; box-sizing: border-box; }
  #view-meal-feed .meal-feed-card-mobile-stream { width: 100%; max-width: 100%; min-width: 0; border-width: 1px 0; border-radius: 0; cursor: default; box-shadow: none; transform: none; box-sizing: border-box; overflow: hidden; }
  #view-meal-feed .meal-feed-card-mobile-stream:hover { border-color: var(--border-color); box-shadow: none; transform: none; }
  #view-meal-feed .mobile-meal-feed-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px; background: #fff; }
  #view-meal-feed .mobile-meal-feed-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); font-size: 14px; font-weight: 700; }
  #view-meal-feed .mobile-meal-feed-date { margin-left: auto; flex-shrink: 0; color: var(--text-muted); font-size: 12px; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-thumb-wrap { aspect-ratio: 1 / 1; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-body { gap: 7px; padding: 10px 14px 12px; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-meta { order: -1; display: block; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-author { display: none; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-footer { justify-content: flex-start; font-size: 14px; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-footer .meal-feed-card-stats { gap: 16px; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-footer .meal-feed-card-stats i,
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-footer .meal-feed-card-stats svg { width: 22px; height: 22px; }
  #view-meal-feed .meal-feed-card-mobile-stream .meal-feed-card-title { display: block; margin: 0; font-size: 14px; line-height: 1.4; }
  #view-meal-feed .mobile-meal-feed-content { display: flex; align-items: flex-end; gap: 5px; min-width: 0; }
  #view-meal-feed .mobile-meal-feed-content-text { display: -webkit-box; min-width: 0; margin: 0; overflow: hidden; color: var(--text-main); font-size: 14px; line-height: 1.5; white-space: pre-line; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  #view-meal-feed .mobile-meal-feed-content.is-expanded { display: block; }
  #view-meal-feed .mobile-meal-feed-content.is-expanded .mobile-meal-feed-content-text { display: block; overflow: visible; }
  #view-meal-feed .mobile-meal-feed-more { flex-shrink: 0; padding: 0; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; }
  #view-meal-feed .mobile-meal-feed-content.is-expanded .mobile-meal-feed-more { margin-top: 3px; }
  #view-meal-feed .mobile-meal-feed-comments { display: flex; flex-direction: column; gap: 3px; }
  #view-meal-feed .mobile-meal-feed-comment { display: flex; gap: 6px; min-width: 0; margin: 0; color: var(--text-main); font-size: 13px; line-height: 1.4; }
  #view-meal-feed .mobile-meal-feed-comment strong { flex-shrink: 0; }
  #view-meal-feed .mobile-meal-feed-comment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #view-meal-feed .mobile-meal-feed-comment-form { display: flex; align-items: center; gap: 8px; min-width: 0; padding-top: 5px; border-top: 1px solid var(--border-color); }
  #view-meal-feed .mobile-meal-feed-comment-input { flex: 1 1 auto; min-width: 0; height: 36px; min-height: 36px; max-height: 92px; padding: 8px 10px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 14px; line-height: 20px; }
  #view-meal-feed .mobile-meal-feed-comment-submit { flex-shrink: 0; padding: 6px 2px; border: 0; background: transparent; color: var(--primary-color); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
  #view-meal-feed .mobile-meal-feed-comment-submit:disabled { opacity: 0.45; cursor: default; }

  .meal-feed-card-body {
    gap: 3px;
    padding: 8px 8px 6px;
  }

  .meal-feed-card-title {
    margin-bottom: 1px;
    font-size: 12.5px;
    line-height: 1.25;
  }

  .meal-feed-card-meta {
    gap: 4px;
  }

  .meal-feed-card-author {
    font-size: 12px;
  }

  .meal-feed-card-date {
    font-size: 12px;
  }

  .meal-feed-card-footer {
    font-size: 12px;
  }

  .meal-feed-card-footer .meal-feed-card-stats {
    gap: 5px;
  }

  .meal-feed-card-footer .meal-feed-card-stats i,
  .meal-feed-card-footer .meal-feed-card-stats svg {
    width: 14px;
    height: 14px;
  }

  .meal-feed-tabs {
    gap: 4px 5px;
    justify-content: space-between;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .meal-feed-tabs::-webkit-scrollbar {
    display: none;
  }

  .meal-feed-tab {
    flex: 0 1 auto;
    padding: 0 0 12px;
    font-size: 13px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .channel-board-category-tabs {
    gap: 4px 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .channel-board-search {
    max-width: none;
  }
}

.community-board-table tbody td.board-post-meta:nth-child(2) {
  width: calc((240px + 7em) / 1.5);
  min-width: calc((240px + 7em) / 1.5);
  max-width: calc((240px + 7em) / 1.5);
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

.community-board-table:not(.product-info-board-table) tbody td.board-post-meta:nth-child(2) {
  text-align: center;
}

.community-board-table:not(.product-info-board-table) tbody td.board-post-meta:nth-child(3) {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  box-sizing: border-box;
}

.community-board-table tbody td.board-post-stats {
  vertical-align: top;
  padding-top: 16px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  white-space: nowrap;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  box-sizing: border-box;
}

.board-post-stat-group {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
  width: auto;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  justify-items: center;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  box-sizing: border-box;
}

.board-post-stat {
  display: inline-grid;
  grid-template-columns: 14px 2ch;
  column-gap: 2px;
  align-items: center;
  justify-content: center;
  justify-items: start;
  padding: 0;
  margin: 0;
  line-height: 1;
  background: none;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  transition: color 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.board-post-stat > span {
  min-width: 2ch;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.board-post-stat-group .board-like-btn {
  display: inline-grid;
  grid-template-columns: 14px 2ch;
  column-gap: 2px;
  align-items: center;
  justify-content: center;
  justify-items: start;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: none;
  font-variant-numeric: tabular-nums;
}

.board-post-stat i,
.board-post-stat svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
  flex-shrink: 0;
}

.board-post-stat-like {
  color: #7b8494;
  background: none;
}

.board-post-stat-comment {
  color: #7b8494;
  background: none;
  cursor: pointer;
  border: none;
  font: inherit;
}

.board-post-stat-comment:hover {
  background: none;
  color: #7b8494;
}

.board-post-stat-view {
  color: #7b8494;
  background: none;
}

.detail-stat-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: color 0.15s ease;
}

.detail-like-btn {
  background: none;
}

.detail-like-btn:hover {
  background: none;
  color: #7b8494;
}

.detail-like-btn.liked svg {
  fill: currentColor;
}

.detail-comment-focus-btn {
  background: none;
}

.detail-comment-focus-btn:hover {
  background: none;
  color: #7b8494;
}

.detail-rating-stat {
  color: #e6a817;
  gap: 4px;
  cursor: pointer;
}

.detail-rating-stat:hover {
  color: #d4950f;
}

.detail-rating-stars {
  display: inline-flex;
  letter-spacing: 0.02em;
  font-size: 14px;
  line-height: 1;
}

.detail-rating-stars .is-empty {
  color: #d7dbe3;
}

/* 각진 유니코드 별(★) 대신 쓰는 부드러운 곡선의 SVG 별 아이콘 */
.star-icon-svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  display: inline-block;
  vertical-align: -0.125em;
  overflow: visible;
}

.detail-view-stat {
  padding: 0;
  background: none;
}

/* ==========================================================================
   VIEW: PRODUCT LOOKUP (제품조회 - 제품안내와 동일한 게시판 톤 + 모바일 카드)
   ========================================================================== */
.product-lookup-table-wrap {
  margin-top: 20px;
  overflow-x: hidden;
  overflow-y: visible;
  max-height: none;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.product-lookup-table-wrap::-webkit-scrollbar {
  width: 8px;
}

.product-lookup-table-wrap::-webkit-scrollbar-track {
  background: #f1f3f5;
}

.product-lookup-table-wrap::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 8px;
}

/* board-table 스타일 기반 — 가로 스크롤 없이 화면 너비에 맞춤 */
.board-table.product-lookup-table {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  width: 99%;
  min-width: 0;
  table-layout: fixed;
  border: none;
  border-radius: 0;
  overflow: visible;
  border-collapse: separate;
  border-spacing: 0;
}

.board-table.product-lookup-table thead th {
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  font-size: 12px;
  padding: 10px 4px;
  line-height: 1.3;
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
}

.board-table.product-lookup-table tbody td {
  vertical-align: middle;
  padding: 10px 4px;
  font-size: 12.5px;
  line-height: 1.6;
  overflow: hidden;
}

.board-table.product-lookup-table .product-lookup-col-stat {
  width: 13.6%;
  padding-left: 2px;
  padding-right: 2px;
}

.board-table.product-lookup-table th:nth-child(1),
.board-table.product-lookup-table td:nth-child(1) {
  width: 36px;
  min-width: 36px;
  text-align: center;
  overflow: visible;
} /* 관리자 체크 */
.board-table.product-lookup-table th:nth-child(2),
.board-table.product-lookup-table td:nth-child(2) {
  width: 40px;
  min-width: 40px;
  overflow: visible;
} /* 이미지 */
.board-table.product-lookup-table th:nth-child(3),
.board-table.product-lookup-table td:nth-child(3) { width: 16%; min-width: 0; }  /* 브랜드 */
.board-table.product-lookup-table th:nth-child(4),
.board-table.product-lookup-table td:nth-child(4) { width: 22.1%; min-width: 0; }  /* 품명 (기존 36.8%의 60%) */
.board-table.product-lookup-table th:nth-child(5),
.board-table.product-lookup-table td:nth-child(5) { width: 5%; }   /* 규격 */
.board-table.product-lookup-table th:nth-child(6) {
  width: 31.2%;
  text-align: center; /* 식품설명 헤더 가운데 정렬 */
}
.board-table.product-lookup-table td:nth-child(6) {
  width: 31.2%;
  text-align: left; /* 식품설명 본문은 왼쪽 정렬 유지 */
}
.board-table.product-lookup-table th:nth-child(7),
.board-table.product-lookup-table td:nth-child(7) { width: 11.7%; }   /* 규격단가 */
.board-table.product-lookup-table th:nth-child(8),
.board-table.product-lookup-table td:nth-child(8) { width: 12.2%; } /* kg단가 */
.board-table.product-lookup-table th:nth-child(10),
.board-table.product-lookup-table td:nth-child(10) {
  width: 9%;
  min-width: 5.6em;
  white-space: nowrap;
  overflow: visible;
}  /* 작성일 */

.product-lookup-check-col {
  display: none;
  vertical-align: middle;
}

.product-lookup-check-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
}

#view-product-search.is-admin-product-manage .product-lookup-check-col {
  display: table-cell;
}

#view-product-search.is-owner-product-manage .product-lookup-check-col.is-disabled,
#view-product-search.is-owner-product-manage .product-lookup-card-check.is-disabled {
  visibility: hidden;
  pointer-events: none;
}

.product-lookup-admin-actions {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
  grid-column: 3;
  justify-self: end;
}

#view-product-search.is-admin-product-manage .product-lookup-admin-actions {
  display: flex;
}

.product-lookup-admin-actions[hidden] {
  display: none !important;
}

.product-lookup-bulk-delete-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #ffa8a8;
  background: #fff5f5;
  color: #c92a2a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.product-lookup-bulk-delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-lookup-bulk-delete-btn:not(:disabled):hover {
  background: #ffe3e3;
}

.product-lookup-card-check {
  display: none;
  flex-shrink: 0;
  padding-top: 2px;
}

.product-lookup-card-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

#view-product-search.is-admin-product-manage .product-lookup-card-check {
  display: block;
}

.product-lookup-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.product-lookup-sortable:hover,
.product-lookup-sortable.is-sorted {
  color: var(--primary-color);
}

.product-lookup-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}

button.product-lookup-stat {
  appearance: none;
  border: none;
  background: none;
  padding: 4px 2px;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}

button.product-lookup-stat:hover {
  color: var(--text-main);
}

.product-lookup-stat i,
.product-lookup-stat svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
}

.product-lookup-stat-rating {
  color: #fab005;
}

.product-lookup-rating-stars {
  display: inline-flex;
  letter-spacing: 0.02em;
  font-size: 13px;
  line-height: 1;
}

.product-lookup-rating-stars .is-empty {
  color: #d7dbe3;
}

.product-lookup-rating-count {
  color: #868e96;
  font-weight: 600;
}

.product-lookup-rating-empty {
  color: #adb5bd;
  font-weight: 600;
}

.product-lookup-thumb-cell {
  text-align: center;
  vertical-align: middle;
}

.product-lookup-thumb-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #f6f1e7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -4px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0;
  color: #868e96;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.product-lookup-thumb-wrap .product-lookup-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  display: block;
  object-fit: cover;
}

.product-lookup-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background-color: #f1f3f5;
  display: block;
  margin: 0 auto;
}

.product-lookup-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #868e96;
  pointer-events: none;
}

.product-lookup-thumb-placeholder svg,
.product-lookup-thumb-placeholder i {
  width: 16px;
  height: 16px;
}

.product-lookup-thumb-wrap.is-addable {
  cursor: pointer;
}

.product-lookup-thumb-wrap.is-addable:hover {
  background-color: #eee6d6;
}

.product-lookup-thumb-wrap.is-loading {
  pointer-events: none;
  cursor: wait;
}

.product-lookup-thumb-wrap.is-loading .product-lookup-thumb-placeholder {
  opacity: 0.35;
}

.product-lookup-thumb-wrap.is-loading::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(134, 142, 150, 0.28);
  border-top-color: #868e96;
  border-radius: 50%;
  animation: product-lookup-thumb-spin 0.7s linear infinite;
}

@keyframes product-lookup-thumb-spin {
  to { transform: rotate(360deg); }
}

.product-lookup-brand {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  font-size: 12.5px;
  line-height: 1.6;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.product-lookup-name-cell {
  text-align: left !important;
  padding-left: 8px !important;
  min-width: 0;
  max-width: none;
  overflow: visible;
}

.product-lookup-name-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.product-lookup-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12.5px;
  line-height: 1.6;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.6em * 2);
  min-width: 0;
  flex: 1 1 0;
}

.product-haccp-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  margin-top: 1px;
}

.product-tag-haccp-unregistered {
  background: none;
  border: none;
  padding: 0 1px;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 11px;
}

.product-lookup-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  min-width: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
  max-height: calc(1.6em * 2);
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.product-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  max-height: calc(1.3em * 2 + 4px);
  overflow: hidden;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* 알레르기: 배경 없이 텍스트만 */
.product-tag-allergy {
  background: none;
  border: none;
  padding: 0 1px;
  color: var(--text-sub);
  font-weight: 500;
  border-radius: 0;
}

.product-tag-origin {
  background-color: rgba(18, 184, 134, 0.1);
  color: var(--secondary-hover);
  border: 1px solid rgba(18, 184, 134, 0.22);
}

.product-lookup-name-row .product-tag-origin,
.product-lookup-card-name-row .product-tag-origin {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}

.product-allergy-estimated-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  background: #f8f9fa;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  vertical-align: middle;
}

.product-lookup-price {
  font-weight: 700;
  white-space: nowrap;
  font-size: 12px;
}

.product-lookup-price-spec {
  color: var(--text-main);
}

.product-lookup-price-kg {
  color: var(--primary-color);
}

.product-lookup-date {
  white-space: nowrap;
  color: var(--text-sub);
  font-size: 12px;
}

.product-lookup-stat {
  font-size: 11.5px;
  gap: 2px;
}

.product-lookup-stat i,
.product-lookup-stat svg {
  width: 12px;
  height: 12px;
}

/* 모바일 카드: 제품안내 표와 같은 흰 카드·보더 톤 */
.product-lookup-card-list {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.product-lookup-mobile-sort {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.product-lookup-sort-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.product-lookup-sort-btn.is-active {
  border-color: var(--secondary-color);
  background: #e6fcf5;
  color: var(--secondary-color);
}

.product-lookup-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
  padding-top: 4px;
}

.product-lookup-footer .write-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-lookup-list-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 10px;
  margin-top: 20px;
  min-height: 34px;
}

.product-lookup-list-bar:not(:has(> :not([hidden]))) {
  display: none;
}

.product-lookup-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  grid-column: 2;
  justify-self: center;
}

.product-lookup-pagination[hidden] {
  display: none;
}

.product-lookup-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.product-lookup-page-btn:hover:not(:disabled) {
  border-color: #ced4da;
  color: var(--text-main);
}

.product-lookup-page-btn.is-active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.product-lookup-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-lookup-card {
  display: flex;
  gap: 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.product-lookup-card:hover {
  background-color: #f8f9fa;
}

#view-product-search .product-lookup-card.is-home-target {
  background-color: #eef8e8;
  outline: 2px solid #8fbf6e;
}

#view-product-search tr.is-home-target > td {
  background-color: #eef8e8;
}

.product-lookup-card-thumb,
.product-lookup-card-thumb-wrap {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  background-color: #f6f1e7;
  flex-shrink: 0;
  margin: 0;
}

.product-lookup-card-thumb-wrap .product-lookup-thumb-placeholder svg,
.product-lookup-card-thumb-wrap .product-lookup-thumb-placeholder i {
  width: 28px;
  height: 28px;
}

.product-lookup-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-lookup-card-brand {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.product-lookup-card-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.product-lookup-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  min-width: 0;
}

.product-lookup-card-rating {
  flex-shrink: 0;
  color: #fab005;
  font-size: 12.5px;
}

.product-lookup-card-rating .product-lookup-rating-stars {
  font-size: 12px;
}

.product-lookup-card-rating .star-icon-svg {
  width: 12px;
  height: 12px;
}

.product-lookup-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.product-lookup-card-meta span {
  white-space: nowrap;
}

.product-lookup-card-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.6em * 2);
  word-break: keep-all;
}

.product-lookup-card-desc:empty {
  display: none;
}

.product-lookup-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-lookup-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.product-lookup-card-prices {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 10px;
}

.product-lookup-card-prices .product-lookup-price-spec {
  font-size: 13.5px;
}

.product-lookup-card-prices .product-lookup-price-kg {
  font-size: 13.5px;
  font-weight: 600;
}

.product-lookup-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .product-lookup-table-wrap {
    display: none;
  }

  .product-lookup-card-list {
    display: flex;
  }

  .product-lookup-mobile-sort {
    display: flex;
  }

  .product-lookup-footer {
    justify-content: stretch;
  }

  .product-lookup-footer .write-tool-btn {
    width: 100%;
    justify-content: center;
  }

  .product-lookup-search {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    order: 3;
  }

  .product-lookup-search .search-input-wrapper {
    width: 100%;
    height: 50px;
    min-height: 0;
    border-radius: 25px;
    padding: 0 16px;
    padding-block: 0;
    box-sizing: border-box;
  }

  .product-lookup-search .search-input-wrapper .search-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }

  .product-lookup-search .search-input-wrapper input {
    height: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
  }

  #view-product-search .product-lookup-board-header {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  #view-product-search .product-lookup-header-main {
    flex: 1 1 auto;
  }

  #view-product-search .vendor-hub-toolbar {
    margin: 0;
  }

  #view-product-search .product-lookup-search {
    margin: 0 !important;
    order: 0;
  }

  #view-product-search .vendor-hub-list-head .product-lookup-search {
    margin: 0 !important;
    order: 0;
  }

  .product-lookup-list-bar {
    grid-template-columns: 1fr;
  }

  .product-lookup-pagination {
    grid-column: 1;
    width: 100%;
  }

  #view-product-search.is-admin-product-manage .product-lookup-admin-actions {
    grid-column: 1;
    justify-self: end;
  }

  /* 모바일 제품조회: 세로 밀도 높이기 (간격만 조정) */
  body:has(#view-product-search.active) #main-header {
    height: 52px;
  }

  body:has(#view-product-search.active) .logo-symbol {
    width: 28px;
    height: 28px;
  }

  body:has(#view-product-search.active) .mobile-sub-nav.mobile-bottom-nav {
    top: auto;
    bottom: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    min-height: 0;
  }

  body:has(#view-product-search.active) .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn {
    height: 56px;
  }

  body:has(#view-product-search.active) .main-content {
    padding-top: 12px;
  }

  #view-product-search .product-lookup-header-main .view-title {
    margin-bottom: 0;
    line-height: 1.2;
  }

  #view-product-search .board-header .write-btn {
    margin-top: 0;
  }

  #view-product-search .product-lookup-mobile-sort {
    margin-top: 0;
    margin-bottom: 0;
    gap: 8px;
    justify-content: flex-end;
  }

  #view-product-search .product-lookup-sort-btn {
    height: 30px;
    padding: 0 12px;
  }

  #view-product-search .product-lookup-card-list {
    margin-top: 16px;
    gap: 8px;
  }

  #view-product-search .product-lookup-card {
    padding: 10px 12px;
    gap: 8px;
  }

  #view-product-search .product-lookup-card-thumb,
  #view-product-search .product-lookup-card-thumb-wrap {
    display: flex;
    width: 40px;
    height: 40px;
  }

  #view-product-search .product-lookup-card-thumb-wrap .product-lookup-thumb-placeholder svg,
  #view-product-search .product-lookup-card-thumb-wrap .product-lookup-thumb-placeholder i {
    width: 18px;
    height: 18px;
  }

  #view-product-search .product-lookup-card-body {
    gap: 2px;
  }

  #view-product-search .product-lookup-card-name {
    line-height: 1.25;
  }

  #view-product-search .product-lookup-card-desc {
    line-height: 1.4;
    -webkit-line-clamp: 1;
    max-height: 1.4em;
  }

  #view-product-search .product-lookup-card-footer {
    margin-top: 0;
    gap: 6px;
  }

  #view-product-search .product-lookup-footer {
    margin-top: 10px;
    padding-top: 0;
    margin-bottom: 0;
  }
}

/* ==========================================================================
   VIEW: AD (Special Deals)
   ========================================================================== */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.ad-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ad-img-wrapper {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.ad-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.ad-card:hover .ad-img-wrapper img {
  transform: scale(1.04);
}

.ad-discount {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.ad-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ad-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ad-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ad-price-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.ad-price-section .old-price {
  font-size: 13px;
  text-decoration: line-through;
  color: var(--text-muted);
}

.ad-price-section .new-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-color);
}

.ad-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 20px;
}

.ad-buy-btn {
  background-color: var(--secondary-color);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  height: 40px;
  border-radius: 8px;
  width: 100%;
  margin-top: auto;
  transition: var(--transition-fast);
}

.ad-buy-btn:hover {
  background-color: var(--secondary-hover);
}

/* ==========================================================================
   Modals System (Login Modal overlay & form styling)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition-smooth);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--text-muted);
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-header-desc {
  margin-bottom: 24px;
  text-align: center;
}

.modal-header-desc h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-header-desc p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 4px;
}

.modal-header-desc p:last-child {
  margin-bottom: 0;
}

.region-portal-modal-content {
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
}

.region-portal-link-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

#region-portal-link-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#region-portal-link-list > .region-portal-link-item {
  justify-content: center;
  min-height: 48px;
}

.work-shortcut-link--portal .work-shortcut-icon,
.work-shortcut-edit-icon--portal {
  background: #fff0f6;
  color: #e64980;
}

.work-shortcut-link--evpn .work-shortcut-icon,
.work-shortcut-edit-icon--evpn {
  background: #edf2ff;
  color: #4263eb;
}

.region-portal-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.region-portal-link-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: #f5f8ff;
}

.region-portal-link-item i {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.region-portal-link-item:hover i {
  color: var(--primary-color);
}

.forgot-reset-notice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f3f5;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form[hidden] {
  display: none !important;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.form-group[hidden],
#write-post-prefix-group[hidden] {
  display: none !important;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.form-group input {
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 14px;
  font-size: 13.5px;
  transition: var(--transition-fast);
}

.form-group input[type="password"] {
  letter-spacing: 0.02em;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.form-group input[readonly] {
  background: #f5f6f8;
  color: var(--text-main);
  cursor: default;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
}

.form-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.submit-btn {
  background-color: var(--primary-color);
  color: #ffffff;
  height: 44px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition-fast);
  margin-top: 4px;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
}

/* 탈퇴 모달 버튼 — .submit-btn 이후에 둬서 스타일이 덮이지 않게 함 */
#withdraw-modal.active {
  z-index: 2300;
}

.withdraw-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.withdraw-modal-actions .submit-btn {
  flex: 1;
  margin-top: 0;
}

.withdraw-modal-actions .withdraw-cancel-btn {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border, #dee2e6);
}

.withdraw-modal-actions .withdraw-cancel-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.withdraw-modal-actions .withdraw-confirm-btn {
  background: #c92a2a;
  border-color: #c92a2a;
  color: #fff;
}

.withdraw-modal-actions .withdraw-confirm-btn:hover:not(:disabled) {
  background: #a51111;
  border-color: #a51111;
}

.withdraw-modal-actions .withdraw-confirm-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer .divider {
  color: var(--border-color);
}

.login-footer .footer-link:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   Post Detail Modal (게시글/게시판 전체 글 보기)
   ========================================================================== */
.detail-modal-content {
  max-width: 560px;
  text-align: left;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-header-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.detail-header-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.detail-header-meta-row > .detail-channel-tag {
  flex-shrink: 0;
  white-space: nowrap;
}

.detail-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.detail-more-menu-wrapper {
  position: relative;
  flex-shrink: 0;
}

.detail-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.detail-more-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-sub);
}

.detail-more-btn svg {
  width: 18px;
  height: 18px;
}

.detail-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 50;
}

.detail-more-menu-wrapper.active .detail-more-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.detail-more-item-danger {
  color: #e03131;
}

@media (min-width: 769px) {
  #detail-more-edit-btn,
  #detail-more-delete-btn,
  #detail-more-notice-btn,
  #detail-more-move-btn {
    display: none !important;
  }
}

.detail-channel-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  background: none;
  padding: 0 0 0 7px;
  border-radius: 0;
  border-left: 2.5px solid currentColor;
  line-height: 1.3;
}

.detail-channel-tag.icon-bubble {
  background-color: var(--badge-sky-bg);
  color: var(--badge-sky-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.detail-channel-tag.icon-menu-plan {
  background-color: var(--badge-workchat-bg);
  color: var(--badge-workchat-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.detail-channel-tag.icon-thumb {
  background-color: var(--badge-pink-bg);
  color: var(--badge-pink-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.detail-channel-tag.icon-public-org {
  background-color: var(--badge-rose-bg);
  color: var(--badge-rose-fg);
  padding: 2px 8px;
  border-radius: 4px;
  border-left: none;
}

.detail-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: normal;
}

.detail-meta #detail-author,
.detail-meta #detail-date {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.detail-meta #detail-date:not(:empty)::before {
  content: '·';
  margin: 0 8px;
  color: var(--text-muted);
}

.author-nickname-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.author-nickname-btn:hover,
.author-nickname-btn:focus-visible {
  color: var(--primary-color);
  text-decoration-color: currentColor;
  outline: none;
}

.author-nickname-static {
  font-weight: 600;
  cursor: default;
}

.board-post-meta .author-nickname-btn,
.post-header .author-nickname-btn {
  font-weight: 500;
  color: var(--text-sub);
}

.messages-box-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.messages-box-tab {
  appearance: none;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.messages-box-tab.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(255, 75, 75, 0.06);
}

.mention-item {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.mention-item.is-unread {
  border-color: var(--primary-color, #ff4b4b);
  background: rgba(255, 75, 75, 0.04);
}

.mention-item-head {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.mention-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.mention-item-snippet {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mention-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.mention-item-unread-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--primary-color, #ff4b4b);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.mention-item-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #ff4b4b);
  flex-shrink: 0;
}

.mention-item-open {
  align-self: flex-start;
  appearance: none;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.detail-comment-item.is-mention-target {
  outline: 2px solid rgba(255, 75, 75, 0.55);
  outline-offset: 2px;
  border-radius: 10px;
  background: rgba(255, 75, 75, 0.08);
  transition: background 0.35s ease, outline-color 0.35s ease;
}

.messages-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.messages-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border-color, #dee2e6);
  border-radius: 10px;
  background: #fff;
}

.message-item {
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
}

.message-item.is-unread {
  border-color: rgba(255, 75, 75, 0.35);
  background: rgba(255, 75, 75, 0.03);
}

.message-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.message-item-from {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.message-item-unread-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 75, 75, 0.12);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 700;
}

.message-item-content {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}

.message-item-actions {
  margin-top: 10px;
}

.message-reply-btn {
  appearance: none;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.message-reply-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.detail-owner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.detail-owner-actions[hidden] {
  display: none !important;
}

.detail-owner-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  writing-mode: horizontal-tb;
  transition: var(--transition-fast);
}

.detail-owner-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.detail-owner-btn[hidden] {
  display: none !important;
}

.detail-notice-btn.is-notice {
  color: #c92a2a;
  border-color: #ffa8a8;
  background: #fff5f5;
}

.detail-notice-btn.is-notice:hover {
  background: #ffe3e3;
  color: #a51111;
}

.detail-owner-btn-danger {
  color: #e03131;
  border-color: #ffc9c9;
}

.detail-owner-btn-danger:hover {
  background: #fff5f5;
  color: #c92a2a;
}

.detail-school-link-panel {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  background: #fafbfc;
}

.detail-school-link-panel[hidden] {
  display: none !important;
}

.detail-school-link-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.detail-school-link-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-sub);
}

.detail-school-link-panel .detail-owner-btn {
  margin-top: 8px;
}

.detail-school-link-panel .detail-owner-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.4;
}

.detail-content {
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 20px;
  max-height: 50vh;
  overflow-y: auto;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-content.detail-body-locked,
.feed-post-card .post-content.is-body-locked,
.board-post-excerpt.is-body-locked {
  color: var(--text-muted);
  font-weight: 500;
  white-space: pre-line;
}

.content-auto-link {
  color: #12315e; /* 곤색 */
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.content-auto-link:hover {
  color: #0b2142;
  opacity: 1;
}

/* 표 형태의 목록 미리보기만 링크 클릭을 막는다.
   커뮤니티 피드 카드의 본문 링크는 실제 <a>가 클릭 이벤트를 받아야 한다. */
.board-post-excerpt .content-auto-link,
.board-post-cell .content-auto-link {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
  cursor: inherit;
}

.feed-post-card .content-auto-link {
  pointer-events: auto;
  cursor: pointer;
}

.content-mention,
.content-mention-chip {
  color: var(--primary-color, #ff4b4b);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  display: inline;
}

.content-mention:hover,
.content-mention:focus-visible,
.content-mention-chip:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

.content-mention.is-static {
  cursor: inherit;
}

.feed-post-card .content-mention,
.board-post-excerpt .content-mention,
.board-post-cell .content-mention {
  pointer-events: none;
  cursor: inherit;
}

.mention-suggest {
  position: fixed;
  z-index: 80;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border-color, #ececec);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 4px;
}

.mention-suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.mention-suggest-item::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: 0 0 auto;
  background-color: #dee2e6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23868e96' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58%;
}

.mention-suggest-item.is-active,
.mention-suggest-item:hover {
  background: #fff4f4;
  color: var(--primary-color, #ff4b4b);
}

.mention-profile-popover {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mention-profile-popover[hidden] {
  display: none !important;
}

.mention-profile-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.mention-profile-card {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  text-align: center;
}

.mention-profile-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
}

.mention-profile-nickname {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.mention-profile-message-btn {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--primary-color, #ff4b4b);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
}

.mention-profile-message-btn[hidden] {
  display: none !important;
}

.mention-profile-close {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
}

/* ==========================================================================
   Signup Agreement Modal (회원가입 약관 동의) & Terms Detail Modal
   ========================================================================== */
.agreement-modal-content {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.agreement-brand {
  margin-bottom: 24px;
  pointer-events: none;
}

.agreement-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.agreement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.agreement-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.school-cross-post-option .agreement-checkbox-row,
.school-cross-post-option .agreement-checkbox-row span,
.school-cross-post-option > .form-hint {
  color: #d32f2f;
}

.agreement-checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
  cursor: pointer;
  flex-shrink: 0;
}

.agreement-view-btn {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
}

.agreement-view-btn:hover {
  color: var(--text-main);
}

.agreement-detail {
  margin-top: 18px;
}

.agreement-detail-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.agreement-detail-title::before {
  content: '• ';
}

.agreement-detail-box {
  max-height: 110px;
  overflow-y: auto;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-sub);
  white-space: pre-line;
  transition: max-height 0.25s ease;
}

.agreement-detail-box.expanded {
  max-height: 320px;
}

.agreement-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.agreement-more-btn:hover {
  color: var(--text-main);
}

.agreement-more-btn i {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.agreement-more-btn.expanded i {
  transform: rotate(180deg);
}

.agreement-submit-wrap {
  display: block;
  width: 100%;
  margin-top: 28px;
  flex: 0 0 auto;
}

.agreement-submit-wrap .agreement-submit-btn,
#signup-agreement-submit,
#signup-agreement-submit.agreement-submit-btn {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0;
  box-sizing: border-box;
}

.agreement-submit-btn:disabled {
  background-color: #ced4da;
  cursor: not-allowed;
}

.signup-form-modal-content {
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.signup-member-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.signup-teacher-only[hidden],
.signup-business-only[hidden] {
  display: none !important;
}

.signup-type-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.signup-type-card:has(input:checked) {
  border-color: var(--secondary-color);
  background: rgba(18, 184, 134, 0.06);
}

.signup-type-card strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-main);
}

.signup-type-card small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.signup-doc-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.signup-doc-help.is-emphasis {
  font-size: 14px;
  font-weight: 600;
  color: #e03131;
}

.signup-nickname-help {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-sub);
  font-weight: 500;
}

.signup-nickname-help.signup-email-privacy-help {
  color: #e03131;
  font-weight: 600;
}

.signup-nickname-help-business {
  margin-top: 2px;
}

.signup-email-row,
.signup-email-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.signup-email-row input,
.signup-email-code-row input {
  flex: 1;
  min-width: 0;
}

.signup-email-code-btn,
.signup-email-resend-btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #12b886;
  background: #fff;
  color: #0ca678;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.signup-email-code-btn:hover:not(:disabled),
.signup-email-resend-btn:hover:not(:disabled) {
  background: rgba(18, 184, 134, 0.08);
}

.signup-email-code-btn:disabled,
.signup-email-resend-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.signup-email-verify-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f8f9fa;
}

.signup-email-verify-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.signup-email-timer {
  font-size: 12.5px;
  font-weight: 700;
  color: #e03131;
}

.signup-email-resend-btn {
  height: 32px;
  border-color: var(--border-color);
  color: var(--text-sub);
}

.signup-email-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #2b8a3e;
  font-size: 13.5px;
  font-weight: 700;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.signup-email-verified[hidden] {
  display: none !important;
}

.signup-email-verified i,
.signup-email-verified svg {
  width: 18px;
  height: 18px;
  color: #2b8a3e;
}

#signup-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.signup-nickname-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.signup-nickname-row input {
  flex: 1;
  min-width: 0;
}

.nickname-random-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d8e8e3;
  border-radius: 8px;
  background: #fff;
  color: var(--secondary-color);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nickname-random-btn:hover,
.nickname-random-btn:focus-visible {
  border-color: var(--secondary-color);
  background: rgba(18, 184, 134, 0.08);
}

.nickname-random-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.nickname-suggestions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.nickname-suggestions-row .nickname-random-btn {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  font-size: 20px;
}

.nickname-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.nickname-suggestions[hidden] {
  display: none;
}

.nickname-suggestion-chip {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #cfe7df;
  border-radius: 999px;
  background: #f3fbf8;
  color: #16745b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nickname-suggestion-chip:hover,
.nickname-suggestion-chip:focus-visible {
  border-color: var(--secondary-color);
  background: #e6f7f1;
}

.nickname-suggestions.is-loading,
.nickname-suggestions.is-error {
  display: block;
  color: #66756f;
  font-size: 12.5px;
  font-weight: 600;
}

.nickname-suggestions.is-error {
  color: #e03131;
}

.signup-nickname-check-btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--secondary-color);
  background: #fff;
  color: var(--secondary-color);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.signup-nickname-check-btn:hover {
  background: rgba(18, 184, 134, 0.08);
}

.signup-nickname-status {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.signup-nickname-status.is-ok {
  color: #2b8a3e;
}

.signup-nickname-status.is-error {
  color: #e03131;
}

.signup-password-match {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.signup-password-match.is-ok {
  color: #2b8a3e;
}

.signup-password-match.is-error {
  color: #e03131;
}

.login-error-message {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #e03131;
}

.signup-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.signup-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.signup-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--secondary-color);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(18, 184, 134, 0.28);
  transition: var(--transition-fast);
}

.signup-upload-btn:hover {
  background: #0ca678;
  transform: translateY(-1px);
}

.signup-upload-btn:active {
  transform: translateY(0);
}

.signup-upload-btn i,
.signup-upload-btn svg {
  width: 16px;
  height: 16px;
}

.signup-file-name {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signup-doc-preview {
  margin-top: 10px;
}

.signup-doc-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8f9fa;
}

.auth-status-banner {
  display: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-status-banner.visible {
  display: block;
}

.auth-status-banner.pending {
  background: #fff3bf;
  color: #e67700;
}

.auth-status-banner.rejected {
  background: #ffe3e3;
  color: #c92a2a;
}

.auth-status-banner-text {
  margin: 0;
}

.auth-status-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.auth-status-banner-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(201, 42, 42, 0.35);
  background: #fff;
  color: #c92a2a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.auth-status-banner-btn-primary {
  background: #c92a2a;
  border-color: #c92a2a;
  color: #fff;
}

.my-reapply-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, #dee2e6);
}

.my-reapply-help {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.auth-status-banner.approved {
  background: #d3f9d8;
  color: #2b8a3e;
}

@media (max-width: 480px) {
  .signup-member-type-row {
    grid-template-columns: 1fr;
  }
}

.terms-detail-modal-content {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.terms-effective-date {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.terms-body {
  white-space: pre-line;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-sub);
  overflow-y: auto;
  flex: 1;
}

.detail-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.detail-favorite-btn {
  margin-left: auto;
  color: #c5c9d1;
  background: none;
}

.detail-favorite-btn:hover {
  background: none;
  color: #f5c518;
}

.detail-favorite-btn.favorited {
  color: #f5c518;
}

.detail-favorite-btn.favorited svg {
  fill: currentColor;
}

.detail-favorite-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.share-link-modal-content {
  max-width: 480px;
}

.share-link-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.share-link-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-main);
  background: #f8f9fa;
}

.share-link-copy-btn {
  flex-shrink: 0;
  width: auto;
  min-width: 72px;
  padding: 10px 16px;
  margin: 0;
}

.share-link-status {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #2b8a3e;
}

.detail-share-btn {
  margin-right: 2.5rem;
  color: #c5c9d1;
  background: none;
}

.detail-share-btn:hover {
  background: none;
  color: #5b8def;
}

.detail-share-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.detail-share-btn.is-copied {
  color: #40c057;
}

.detail-comments-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.detail-comments-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-comments-heading[hidden] {
  display: none !important;
}

.detail-comments-heading span {
  color: var(--primary-color);
}

#detail-comments-heading-count {
  margin-left: 3px;
}

.detail-review-avg {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-review-summary {
  margin: 0 0 8px;
  padding-bottom: 4px;
}

.detail-review-summary[hidden] {
  display: none !important;
}

.detail-review-summary-count {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}

.detail-comments-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
  max-height: 420px;
  overflow-y: auto;
}

.detail-comments-list:empty {
  display: none;
}

.detail-comments-section.is-product-review .detail-comments-list {
  gap: 0;
  max-height: none;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
}

.detail-comments-section.is-product-review .detail-review-item {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 2px;
}

.detail-comments-section.is-product-review .detail-review-item-stars {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 2px;
}

.detail-comments-section.is-product-review .detail-review-item-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.detail-comments-section.is-product-review .detail-review-item-author {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-comments-section.is-product-review .detail-review-item-actions {
  margin-top: 12px;
}

.detail-review-helpful-btn {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px;
  gap: 6px;
}

.detail-review-helpful-btn:hover {
  background: #f8f9fa;
  color: var(--text-main);
}

.detail-review-helpful-btn.liked {
  border-color: rgba(64, 192, 87, 0.45);
  color: #2f9e44;
  background: rgba(64, 192, 87, 0.08);
}

.detail-review-helpful-label {
  font-weight: 600;
}

.detail-review-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-review-rating[hidden] {
  display: none !important;
}

.detail-review-rating-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

.detail-review-stars {
  display: inline-flex;
  gap: 2px;
}

.detail-review-star {
  border: none;
  background: transparent;
  padding: 0 1px;
  font-size: 22px;
  line-height: 1;
  color: #dee2e6;
  cursor: pointer;
}

.detail-review-star.is-active,
.detail-review-star.is-preview {
  color: #fab005;
}

.detail-comment-rating {
  display: inline-flex;
  gap: 1px;
  margin: 0 0 6px;
  color: #fab005;
  font-size: 14px;
  letter-spacing: 1px;
}

.detail-comment-rating .is-empty {
  color: #dee2e6;
}

.detail-comments-section.is-product-review .detail-comment-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.detail-comments-section.is-product-review .detail-comment-compose {
  width: 100%;
}

.detail-comments-section.is-product-review .detail-comment-submit {
  align-self: flex-end;
}

.detail-review-limit-notice {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #ffe8a3;
  color: #845c00;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: keep-all;
}

.detail-review-limit-notice[hidden] {
  display: none !important;
}

.detail-comment-item {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 12px 14px;
}

.detail-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.detail-comment-author {
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.detail-comment-meta .author-with-grade,
.detail-comment-author-row .author-with-grade {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.detail-comment-text {
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-comment-text.is-deleted-notice {
  color: var(--text-muted);
  font-style: italic;
}

.detail-comment-item.is-deleted .detail-comment-author {
  color: var(--text-muted);
}

.detail-comment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.detail-comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.detail-comment-action-btn:hover {
  background: #fff;
  color: var(--text-sub);
}

.detail-comment-delete-btn:hover {
  color: #e03131;
  background: rgba(224, 49, 49, 0.06);
}

.detail-comment-edit-form,
.detail-comment-reply-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-comment-edit-input,
.detail-comment-reply-input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 64px;
}

.detail-comment-edit-form-actions,
.detail-comment-reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.detail-comment-edit-cancel,
.detail-comment-reply-cancel {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
}

.detail-comment-edit-submit,
.detail-comment-reply-submit {
  border: none;
  background: var(--primary-color);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.detail-comment-like-btn {
  color: #7b8494;
  background: #f1f3f5;
}

.detail-comment-like-btn:hover {
  background: #e9ecef;
  color: #7b8494;
}

.detail-comment-like-btn,
.detail-comment-reply-btn {
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 500;
  gap: 3px;
}

.detail-comment-like-btn i,
.detail-comment-like-btn svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

.detail-comment-like-btn.liked svg {
  fill: currentColor;
}

.detail-comment-helpful-btn {
  min-height: 36px;
  padding: 6px 10px;
  gap: 6px;
  color: var(--text-muted);
  background: transparent;
  font-weight: 600;
}

.detail-comment-helpful-btn:hover:not(:disabled) {
  background: #fff;
  color: var(--text-sub);
}

.detail-comment-helpful-btn.is-helped {
  color: var(--primary-color);
  background: rgba(255, 75, 75, 0.08);
}

.detail-comment-helpful-btn.is-helped:hover:not(:disabled) {
  color: var(--primary-color);
  background: rgba(255, 75, 75, 0.12);
}

.detail-comment-helpful-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.detail-comment-helpful-icon {
  font-size: 14px;
  line-height: 1;
}

.detail-comment-helpful-label {
  font-size: 12px;
}

.detail-comment-helpful-count {
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}

.share-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  vertical-align: middle;
  white-space: nowrap;
}

.share-badge-sprout {
  color: #2b8a3e;
  background: #ebfbee;
  border-color: #b2f2bb;
}

.share-badge-king {
  color: #e67700;
  background: #fff9db;
  border-color: #ffe066;
}

.detail-comment-meta .share-badge,
.detail-meta .share-badge,
.meal-feed-card-author .share-badge {
  margin-left: 6px;
}

.my-share-badge-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.my-share-badge-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.my-share-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.my-share-badge-status {
  font-size: 13.5px;
  color: var(--text-sub);
}

.my-share-badge-help {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.my-share-badge-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
  min-height: 36px;
}

.my-share-badge-check input {
  width: 16px;
  height: 16px;
}

@media (max-width: 720px) {
  .detail-comment-helpful-btn {
    min-height: 40px;
    padding: 8px 12px;
  }

  .detail-comment-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
}

.detail-comment-reply-btn {
  color: #7b8494;
  background: #f1f3f5;
}

.detail-comment-reply-btn:hover {
  background: #e9ecef;
  color: #7b8494;
}

.detail-comment-reply-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-comment-reply-form[hidden],
.detail-comment-edit-form[hidden] {
  display: none !important;
}

.detail-comment-reply-input {
  width: 100%;
  resize: vertical;
  min-height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.detail-comment-reply-input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.detail-comment-reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.detail-comment-reply-cancel,
.detail-comment-reply-submit {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.detail-comment-reply-cancel {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
}

.detail-comment-reply-submit {
  border: none;
  background: var(--primary-color);
  color: #fff;
}

.detail-comment-reply-submit:hover {
  background: var(--primary-hover);
}

.detail-comment-submit:disabled,
.detail-comment-reply-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.detail-comment-replies {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 14px;
  border-left: 2px solid #e9ecef;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-comment-reply {
  background: #fff;
  border: 1px solid #eef1f4;
}

.detail-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.detail-comment-compose {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.detail-comment-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.detail-comment-input {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background-color: #fff;
  line-height: 1.45;
}

.detail-comment-input:focus {
  border-color: var(--primary-color);
  outline: none;
}


.detail-comment-edit-form .detail-comment-input-wrap,
.detail-comment-reply-form .detail-comment-input-wrap {
  width: 100%;
}


.detail-comment-submit {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.detail-comment-submit:hover {
  background-color: var(--primary-hover);
}

.detail-comment-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}


/* Write Post Modal - select & textarea share form-group input styling */
.modal-form select,
.modal-form textarea {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 14px;
  font-size: 13.5px;
  font-family: inherit;
  transition: var(--transition-fast);
}

.modal-form select {
  height: 42px;
  background-color: #ffffff;
}

/* 커뮤니티 글쓰기 채널 선택: 선택값·옵션 글자만 키움 (높이·테두리 유지) */
#view-write-post #write-post-channel,
#view-write-post #write-post-channel option {
  font-size: 15.5px;
  font-weight: 600;
}

.modal-form textarea {
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

/* 글쓰기 본문: 인라인 이미지 드래그·크기 조절 */
.write-content-editor {
  position: relative;
  min-height: 160px;
  max-height: none;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-main);
  outline: none;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.write-content-editor:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.write-content-editor.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  white-space: pre-line;
  pointer-events: none;
}

/* 커뮤니티 글쓰기: 제목+본문을 하나의 흰색 영역으로 이어 보이게 */
.write-composer-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.write-composer {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: none;
  box-shadow: none;
}

#view-write-post .write-composer-group,
#view-product-info-write .write-composer-group {
  gap: 8px;
}

#view-product-info-write .write-composer {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px 14px 0;
}

#view-write-post .form-group .write-title-input,
#view-write-post .write-title-input,
#view-product-info-write .form-group .write-title-input,
#view-product-info-write .write-title-input {
  appearance: none;
  height: auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 6px 0 10px;
  border: none;
  border-radius: 0;
  outline: none;
  background: #fff;
  box-shadow: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
}

#view-write-post .form-group .write-title-input:focus,
#view-write-post .write-title-input:focus,
#view-product-info-write .form-group .write-title-input:focus,
#view-product-info-write .write-title-input:focus {
  border: none;
  outline: none;
  box-shadow: none;
}

#view-write-post .write-title-input::placeholder,
#view-product-info-write .write-title-input::placeholder {
  color: var(--text-muted);
  font-weight: 700;
  opacity: 1;
}

#view-product-info-write .write-composer .write-title-input,
#view-product-info-write .write-composer .write-title-input:focus {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#view-write-post .write-composer .write-content-editor,
#view-write-post .write-composer .write-content-editor:focus,
#view-product-info-write .write-composer .write-content-textarea,
#view-product-info-write .write-composer .write-content-textarea:focus {
  min-height: 180px;
  margin: 0;
  padding: 4px 0 12px;
  border: none;
  border-radius: 0;
  outline: none;
  background: #fff;
  box-shadow: none;
}

#view-write-post .write-composer .write-content-editor.is-empty::before {
  top: 4px;
  left: 0;
  right: 0;
}

.write-content-editor .inline-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 8px 0;
  vertical-align: bottom;
  line-height: 0;
  touch-action: pan-y;
}

.write-content-editor .inline-image-wrap.is-selected {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.write-content-editor .inline-post-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #f7f7f8;
  cursor: grab;
  -webkit-user-drag: element;
  -webkit-touch-callout: none;
  user-select: none;
}

.write-content-editor .inline-image-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--primary-color);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: nwse-resize;
  z-index: 2;
}

.write-content-editor .inline-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 3;
}

.write-content-editor .inline-image-remove:hover {
  background-color: rgba(0, 0, 0, 0.72);
}

.write-content-editor .inline-image-remove i,
.write-content-editor .inline-image-remove svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.4px;
}

.write-content-editor.is-image-pressing,
.write-content-editor.is-image-pressing * {
  user-select: none;
}

.write-content-editor .inline-image-wrap.is-dragging {
  opacity: 0.45;
}

body.is-inline-image-dragging,
body.is-inline-image-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.write-content-editor .inline-image-move {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 28px);
  z-index: 4;
}

.write-content-editor .inline-image-wrap.is-selected.show-move-controls .inline-image-move,
.write-content-editor.is-touch-reorder .inline-image-wrap.is-selected .inline-image-move {
  display: flex;
}

.write-content-editor .inline-image-move button {
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 7px 10px;
  cursor: pointer;
  touch-action: manipulation;
}

.write-content-editor .inline-image-move-up::before {
  content: "위로 이동";
}

.write-content-editor .inline-image-move-down::before {
  content: "아래로 이동";
}

.write-content-editor .inline-image-move button:disabled {
  opacity: 0.4;
  cursor: default;
}

.write-image-drop-indicator {
  position: fixed;
  height: 3px;
  margin-top: -2px;
  border-radius: 999px;
  background: var(--primary-color, #ff4b4b);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color, #ff4b4b);
  pointer-events: none;
  z-index: 10000;
}

.write-image-drop-indicator[hidden] {
  display: none !important;
}

.detail-content .inline-post-image,
.detail-content img.inline-post-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(80vh, 900px);
  object-fit: contain;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #f7f7f8;
  cursor: zoom-in;
}

/* 글쓰기 본문: 세로 스크롤 대신 내용 길이에 맞게 높이 확장 */
.write-page-form textarea.write-autosize-textarea {
  overflow-y: hidden;
  resize: none;
  field-sizing: content;
}

.write-page-form .write-content-editor {
  field-sizing: content;
}

.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

/* 구인구직 글쓰기 페이지: 필드가 많아 줄 간격을 더 촘촘하게 */
.job-write-page-form {
  gap: 8px;
}

.job-write-page-form .form-group {
  gap: 4px;
}

.job-write-page-form select,
.job-write-page-form .form-group input {
  height: 38px;
}

.job-write-page-form textarea {
  min-height: 96px;
  padding: 10px 12px;
}

#job-write-post-content::placeholder {
  color: var(--text-muted, #9aa0a6);
}

#job-write-post-content:focus::placeholder {
  color: transparent;
}

/* ==========================================================================
   Write Post Modal - 사진 첨부 / 투표 추가 도구
   ========================================================================== */
.js-file-drop-zone {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: transparent;
  outline: none;
}

.js-file-drop-zone:hover {
  border-color: var(--primary-color);
  cursor: pointer;
}

.js-file-drop-zone[data-drop-input="meal-feed-write-photo-input"] {
  transition: var(--transition-fast);
}

.js-file-drop-zone[data-drop-input="meal-feed-write-photo-input"]:hover {
  border-color: var(--secondary-color);
}

.js-file-drop-zone[data-drop-input="meal-feed-write-photo-input"]:hover .file-drop-hint {
  color: var(--secondary-color);
}

.js-file-drop-zone:focus-visible {
  border-color: var(--secondary-color);
}

.js-file-drop-zone.is-drop-active {
  border-color: var(--secondary-color);
  background: rgba(18, 184, 134, 0.08);
}

.file-drop-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.file-drop-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 720px) {
  .file-drop-split {
    grid-template-columns: 1fr 1fr;
  }
}

.product-info-attach-drop {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#product-info-write-form .write-tool-btn.is-attach-active {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  background-color: rgba(18, 184, 134, 0.08);
}

.meal-converter-upload-actions.js-file-drop-zone,
.signup-file-row.js-file-drop-zone,
.signup-upload-row.js-file-drop-zone {
  margin-top: 0;
}

.chat-cover-upload.js-file-drop-zone {
  display: block;
}

.write-extra-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.write-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.write-tool-btn:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.write-tool-btn i,
.write-tool-btn svg,
.write-tool-btn .meal-feed-write-tool-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: block;
}

.write-tool-btn.active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #ffffff;
}

.write-link-modal-content {
  max-width: 420px;
}

.write-link-form .submit-btn {
  width: 100%;
  margin-top: 4px;
}

/* 표시글자 링크는 URL처럼 강제 줄바꿈하지 않는다 */
a.content-auto-link:not([href='']) {
  word-break: break-word;
}

.write-photo-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.write-photo-preview-list:empty {
  display: none;
}

.write-photo-preview-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.write-photo-preview-item img {
  width: 76px;
  height: 76px;
  max-width: 76px;
  max-height: 76px;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.write-photo-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.write-photo-preview-remove i {
  width: 11px;
  height: 11px;
}

.write-file-preview-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.write-file-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafafa;
}

.write-file-preview-item i.write-file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-sub);
}

.write-file-preview-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.write-file-preview-size {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.write-file-preview-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.write-file-preview-remove:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--primary-color);
}

.write-file-preview-remove i {
  width: 14px;
  height: 14px;
}

.write-poll-modal-content {
  max-width: 380px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.write-poll-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.write-poll-remove-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
}

.write-poll-remove-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

.write-poll-remove-btn i {
  width: 14px;
  height: 14px;
}

.write-poll-question-input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 12px;
  font-size: 13.5px;
  font-family: inherit;
  background-color: #ffffff;
}

.write-poll-question-input:focus {
  border-color: var(--primary-color);
}

.write-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.write-poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.write-poll-option-input {
  flex-grow: 1;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  background-color: #ffffff;
}

.write-poll-option-input:focus {
  border-color: var(--primary-color);
}

.write-poll-option-remove-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 50%;
}

.write-poll-option-remove-btn:hover:not(:disabled) {
  background-color: rgba(255, 75, 75, 0.08);
  color: var(--primary-color);
}

.write-poll-option-remove-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.write-poll-option-remove-btn i {
  width: 16px;
  height: 16px;
}

.write-poll-add-option-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--secondary-color);
  padding: 4px 2px;
}

.write-poll-add-option-btn i {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   Feed Post Card - 첨부 사진 / 투표 렌더링
   ========================================================================== */
.post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.post-images img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.detail-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 12px 0 16px;
}

/* 첨부 사진은 본문 너비 안에서 원본 비율을 유지한다 */
#view-post-detail .detail-images img,
.post-detail-card .post-images.detail-images img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(80vh, 900px);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: block;
  margin: 0 auto;
  background: #fff;
  cursor: zoom-in;
}

/* 본문 첨부 사진 원본 보기 */
.image-lightbox-overlay {
  z-index: 3200;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  padding: 24px;
}

.image-lightbox-dialog {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: transparent;
}

.image-lightbox-close {
  top: -8px;
  right: -8px;
  z-index: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  padding: 8px;
}

.image-lightbox-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
}

.image-lightbox-nav[hidden],
.image-lightbox-counter[hidden] {
  display: none !important;
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-lightbox-nav:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.7);
}

.image-lightbox-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.image-lightbox-prev {
  left: 8px;
}

.image-lightbox-next {
  right: 8px;
}

.image-lightbox-nav i {
  width: 24px;
  height: 24px;
}

.image-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  .image-lightbox-overlay {
    padding: 12px;
  }

  .image-lightbox-close {
    top: 0;
    right: 0;
  }

  .image-lightbox-nav {
    width: 36px;
    height: 36px;
  }
}

.detail-images[hidden] {
  display: none !important;
}

/* 게시글 상세: 다중 이미지 갤러리 (PC 화살표 / 모바일 스와이프) */
.detail-images.post-image-gallery {
  position: relative;
  align-items: stretch;
  gap: 0;
}

.post-gallery-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(70vh, 640px);
  touch-action: pan-y;
  overscroll-behavior-x: none;
  border-radius: 12px;
  background: #111;
  border: 1px solid var(--border-color);
  -webkit-user-select: none;
  user-select: none;
}

.detail-images .post-gallery-viewport {
  background: #fff;
}

.post-gallery-track {
  display: flex;
  flex-direction: row;
  gap: 0;
  height: 100%;
  will-change: transform;
}

.post-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.detail-images .post-gallery-slide {
  background: #fff;
}

#view-post-detail .detail-images.post-image-gallery img,
.post-detail-card .post-images.detail-images.post-image-gallery img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
  pointer-events: auto;
}

.post-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #222;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.post-gallery-nav i {
  width: 22px;
  height: 22px;
}

.post-gallery-nav:disabled {
  opacity: 0.32;
  cursor: default;
}

.post-gallery-prev {
  left: 12px;
}

.post-gallery-next {
  right: 12px;
}

.post-gallery-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 8px;
  border-radius: 999px;
  pointer-events: none;
}

.post-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.post-gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.post-gallery-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

.detail-images .post-gallery-nav {
  color: #8a8f98;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.14);
}

.detail-images .post-gallery-nav:hover:not(:disabled) {
  color: #6b7280;
  background: rgba(255, 255, 255, 0.92);
}

.detail-images .post-gallery-dot {
  background: rgba(0, 0, 0, 0.22);
}

.detail-images .post-gallery-dot.is-active {
  background: #6b7280;
}

.meal-feed-card-thumb-wrap.post-image-gallery {
  display: block;
}

.meal-feed-card-thumb-wrap .post-gallery-viewport {
  aspect-ratio: auto;
  height: 100%;
  max-height: none;
  border: none;
  border-radius: 0;
  background: #f1f3f5;
}

.meal-feed-card-thumb-wrap .post-gallery-slide {
  background: #f1f3f5;
}

.meal-feed-card-thumb-wrap.post-image-gallery img,
.meal-feed-card-thumb-wrap .post-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-height: none;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.meal-feed-card-thumb-wrap .post-gallery-nav {
  width: 30px;
  height: 30px;
}

.meal-feed-card-thumb-wrap .post-gallery-nav i {
  width: 18px;
  height: 18px;
}

.meal-feed-card-thumb-wrap .post-gallery-counter {
  right: 52px;
}

.meal-feed-card-thumb-wrap .meal-feed-card-favorite-btn {
  z-index: 5;
}

.meal-feed-card-thumb-wrap .meal-feed-card-video-badge {
  z-index: 4;
}

.feed-post-thumb.post-image-gallery,
.board-post-thumb.post-image-gallery,
.feed-post-thumb.is-list-thumb,
.board-post-thumb.is-list-thumb {
  display: block;
  position: relative;
  padding: 0;
}

.feed-post-thumb .post-gallery-viewport,
.board-post-thumb .post-gallery-viewport {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  border: none;
  border-radius: 0;
  background: #f1f3f5;
}

.feed-post-thumb .post-gallery-slide,
.board-post-thumb .post-gallery-slide {
  background: #f1f3f5;
}

.feed-post-thumb.post-image-gallery img,
.board-post-thumb.post-image-gallery img,
.feed-post-thumb .post-gallery-slide img,
.board-post-thumb .post-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-height: none;
  border: none;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
}

.feed-post-thumb .post-gallery-nav,
.board-post-thumb .post-gallery-nav {
  width: 22px;
  height: 22px;
}

.feed-post-thumb .post-gallery-nav i,
.board-post-thumb .post-gallery-nav i {
  width: 14px;
  height: 14px;
}

.feed-post-thumb .post-gallery-prev,
.board-post-thumb .post-gallery-prev {
  left: 4px;
}

.feed-post-thumb .post-gallery-next,
.board-post-thumb .post-gallery-next {
  right: 4px;
}

.feed-post-thumb .post-gallery-counter,
.board-post-thumb .post-gallery-counter {
  top: 4px;
  right: 4px;
  font-size: 10px;
  padding: 2px 5px;
}

.feed-post-thumb .post-gallery-dots,
.board-post-thumb .post-gallery-dots {
  bottom: 4px;
  gap: 4px;
}

.feed-post-thumb .post-gallery-dot,
.board-post-thumb .post-gallery-dot {
  width: 5px;
  height: 5px;
}

@media (min-width: 769px) {
  .post-image-gallery.has-multiple .post-gallery-nav {
    display: inline-flex;
  }
}

#view-post-detail .detail-images.has-multiple .post-gallery-nav {
  display: inline-flex;
}

@media (max-width: 768px) {
  .post-gallery-viewport {
    aspect-ratio: 1 / 1;
    max-height: none;
  }

  .detail-images .post-gallery-viewport {
    aspect-ratio: 4 / 3;
    max-height: min(70vh, 640px);
  }

  .meal-feed-card-thumb-wrap .post-gallery-viewport {
    aspect-ratio: auto;
  }
}

.detail-video {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  overflow-x: hidden;
}

.detail-video[hidden] {
  display: none !important;
}

.detail-video.is-youtube-wide {
  max-width: min(100%, 560px);
}

.detail-video.is-instagram-post,
.detail-video.is-instagram-embed {
  max-width: min(100%, 540px);
}

.meal-feed-video-card {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #111;
  max-width: 100%;
}

.meal-feed-video-card.is-instagram-post,
.meal-feed-video-card.is-instagram-embed {
  background: #fff;
}

.meal-feed-ig-embed {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #fff;
}

.meal-feed-ig-photo {
  display: block;
  width: 100%;
  height: auto;
  background: #f3f4f6;
}

.meal-feed-ig-embed .meal-feed-ig-fallback {
  display: block;
  margin: 10px 12px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.meal-feed-ig-embed .instagram-media {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  background: #fff !important;
  box-sizing: border-box;
}

.meal-feed-ig-embed iframe {
  max-width: 100% !important;
}

.meal-feed-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #111;
}

.detail-video.is-youtube-wide .meal-feed-video-frame {
  aspect-ratio: 16 / 9;
}

.meal-feed-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.meal-feed-video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.meal-feed-video-platform {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-feed-video-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.meal-feed-video-open:hover {
  filter: brightness(0.96);
}

@media (max-width: 768px) {
  .detail-video,
  .detail-video.is-youtube-wide,
  .detail-video.is-instagram-post,
  .detail-video.is-instagram-embed {
    max-width: 100%;
  }
}

.detail-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0 0 16px;
}

.detail-attachments[hidden] {
  display: none !important;
}

.detail-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafafa;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: var(--transition-fast);
}

.detail-attachment-link:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.detail-attachment-link i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.detail-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-poll {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  background-color: #f8f9fa;
  margin-bottom: 14px;
}

.post-poll-question {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.post-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-poll-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #ffffff;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.post-poll-option-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background-color: rgba(18, 184, 134, 0.14);
  transition: width 0.3s ease;
}

.post-poll-option-label,
.post-poll-option-count {
  position: relative;
  z-index: 1;
}

.post-poll-option-count {
  color: var(--text-muted);
  font-weight: 700;
}

.post-poll.voted .post-poll-option {
  cursor: default;
}

.post-poll:not(.voted) .post-poll-option:hover {
  border-color: var(--secondary-color);
}

.post-poll-option.selected {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.post-poll-total {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 48px 0;
}

.footer-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo {
  font-family: var(--font-eng);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.05em;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
}

/* Hide mobile-specific layout components on Desktop */
.mobile-sub-nav {
  display: none;
}
.mobile-search-bar {
  display: none;
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

/* Tablet Mode */
@media (max-width: 1024px) {
  .home-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }

  .home-feed {
    min-width: 0;
  }

  .promo-card,
  .nutie-cta-card {
    margin-bottom: 0;
  }
  
  .channels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    column-gap: 6px;
    row-gap: 6px;
  }

  .header-search {
    margin: 0 16px;
  }

  /* 내비게이션 메뉴 글자가 세로로 줄바꿈되지 않도록 좁은 화면에서 크기 축소 */
  .nav-menu ul {
    gap: 12px;
    margin-left: 20px;
  }

  .header-logo-divider {
    margin-left: 10px;
  }

  .nav-tab-btn {
    font-size: 14px;
  }

  .login-btn,
  .write-btn {
    padding: 8px 14px;
  }

  .user-name {
    max-width: 64px;
  }
}

/*
  홈 3단 → 2단 전환. 1024px에서 전환하면 1025px과 1024px 사이에서 가운데
  칼럼 폭과 우측 사이드바 위치가 한꺼번에 튀어, 최대화된 브라우저와 설치형
  PWA 창이 전혀 다른 레이아웃으로 보인다. 3단을 유지할 수 있는 구간까지
  전환점을 내린다.
*/
@media (max-width: 900px) {
  /* 좁은 창에서도 왼쪽 위젯(검색어·업무 바로가기·구인사이트)과 피드를 함께 표시 */
  .home-layout {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .home-sidebar-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .home-sidebar-right .widget-card,
  .home-sidebar-right .work-shortcuts-card {
    margin-bottom: 0;
  }
}

/* Mobile Mode */
@media (max-width: 768px) {
  .tab-view {
    scroll-margin-top: 60px;
  }

  .top-bar {
    display: none !important;
  }

  .nav-menu {
    display: none; /* Hide header tabs */
  }

  .header-logo-divider {
    display: none;
  }
  
  .header-search {
    display: none; /* Hide search in header on mobile */
  }

  #view-product-search .vendor-hub-list-head .header-search {
    display: block;
  }

  /* 앱: 가로 스크롤·우측 빈 화면 없이 본문·댓글이 화면 너비를 채움 (좌우 16px) */
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  #main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  body {
    padding-top: 60px;
  }

  body:has(#view-product-search.active) {
    padding-top: 52px;
  }

  /* 모바일: 공통 헤더는 홈에서만. 다른 화면은 자체 상단이 최상단부터 보이게 한다 */
  body:not(.is-home-view) #main-header {
    display: none !important;
  }

  body:not(.is-home-view) {
    padding-top: 0;
  }

  body:not(.is-home-view):has(#view-product-search.active) {
    padding-top: 0;
  }

  body:not(.is-home-view):has(#view-product-search.active) .main-content {
    padding-top: 0;
  }

  body:not(.is-home-view) #view-product-search {
    padding-top: 20px;
  }

  #view-post-detail .detail-nav-row {
    justify-content: flex-end;
  }

  #view-post-detail.mobile-detail-overlay {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 997;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--bg-page);
    padding: env(safe-area-inset-top, 0px) 10px calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
    min-width: 0;
    animation: none;
  }

  body:has(#view-product-search.active) #view-post-detail.mobile-detail-overlay {
    top: 0;
  }

  body.mobile-post-detail-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    padding-top: 0;
  }

  body.mobile-post-detail-open #main-header {
    display: none !important;
  }

  .main-container,
  .header-container,
  .top-bar-container,
  .footer-container {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }

  .header-container {
    padding-right: max(24px, calc(16px + env(safe-area-inset-right, 0px)));
  }

  .header-actions {
    gap: 6px;
  }

  .logo-wrapper {
    gap: 2px;
  }

  .main-container,
  .tab-view.active,
  #view-post-detail {
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
  }

  /* 게시판 헤더: 가운데 검색창은 제품조회처럼 모바일에서 전체 폭 */
  .board-header-with-search {
    flex-wrap: wrap;
    gap: 0 8px;
    align-items: center;
    margin-bottom: 0;
  }

  .board-centered-search {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    display: block !important;
    margin: 14px 0 0 !important;
    order: 3;
  }

  .board-centered-search .search-input-wrapper {
    width: 100%;
    height: 50px;
    min-height: 0;
    border-radius: 25px;
    padding: 0 16px;
    padding-block: 0;
    box-sizing: border-box;
  }

  .board-centered-search .search-input-wrapper .search-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }

  .board-centered-search .search-input-wrapper input {
    height: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
  }

  /* 급식피드·커뮤니티 모바일 상단 압축 */
  #view-meal-feed .board-header,
  #view-channels .board-header {
    margin-bottom: 0;
    align-items: center;
  }

  #view-meal-feed .board-header .view-title,
  #view-channels .view-title {
    margin: 0;
  }

  #view-meal-feed .board-header .write-btn,
  #view-product-info .board-header .write-btn,
  #view-channels .board-header > .write-btn {
    margin: 0;
    height: auto;
    align-self: center;
  }

  #view-meal-feed .meal-feed-tabs,
  #view-product-info .meal-feed-tabs {
    margin: 14px 0 12px;
  }

  #view-channels .category-pills-container {
    margin-top: 14px;
    margin-bottom: 0;
  }

  #view-channels .community-filter-posts {
    margin-top: 0;
  }

  #view-channels .community-mobile-section {
    margin-top: 0;
  }

  .board-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    max-width: 100%;
  }

  .board-header-actions .header-search.header-search {
    display: block !important;
    flex: 1 1 160px;
    width: auto;
    min-width: 140px;
    max-width: 220px;
    margin: 0;
  }

  .board-header-actions .header-search .search-input-wrapper {
    width: 100%;
  }

  .board-header-actions .write-btn {
    flex-shrink: 0;
  }

  .pwa-install-btn {
    margin-right: 4px;
  }

  .pwa-install-mark {
    width: 34px;
    height: 34px;
  }

  .pwa-install-label {
    font-size: 9px;
  }
  
  .mobile-toggle-btn {
    display: block; /* Show menu toggle */
    padding: 6px 8px 6px 2px;
  }

  /* 모바일 홈: 피드 → 누티 CTA → 주요 업무도구 → 업무 바로가기 */
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar-left,
  .home-sidebar-right {
    display: contents;
  }

  .work-major-tools-card {
    display: block;
    order: 4;
  }

  .home-feed {
    order: 2;
  }

  .nutie-cta-card {
    order: 3;
  }

  .work-shortcuts-card {
    order: 5;
  }

  .work-shortcut-edit-modal-content {
    max-height: min(88vh, calc(100dvh - 12px));
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .work-shortcut-edit-list {
    max-height: min(46vh, 360px);
  }

  .work-shortcut-toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .home-login-cta {
    order: 6;
  }

  .home-sidebar-right > .widget-card:has(#home-popular-product-keywords-list) {
    order: 7;
  }

  .home-feed-tab {
    font-size: 13px;
  }

  .home-field-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  /* 모바일 홈 피드(인기글/최신글/기관자료): 제목·작성일만 */
  .home-feed .feed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .home-feed .feed-post-card.home-feed-compact {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex: 0 0 auto;
    align-self: stretch;
    gap: 4px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px 14px;
    overflow: hidden;
    transform: none;
  }

  .home-feed .feed-post-card.home-feed-compact:hover,
  .home-feed .feed-post-card.home-feed-compact:active,
  .home-feed .feed-post-card.home-feed-compact:focus-visible {
    transform: none;
  }

  .home-feed .feed-post-card.home-feed-compact .post-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* 모바일: 썸네일 없는 홈 카드는 빈 칸을 두지 않고 제목을 더보기와 같은 오른쪽 끝까지 사용 */
  .home-feed .feed-post-card:not(.has-thumb)::after {
    display: none;
    content: none;
    flex: 0 0 0;
    width: 0;
    height: 0;
    min-width: 0;
  }

  .home-meal-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .home-sidebar-right .widget-card,
  .promo-card,
  .nutie-cta-card {
    margin-bottom: 16px;
  }

  /* 커뮤니티 필터: 탭을 한 줄에 모두 표시 */
  #view-channels .category-pills {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px 5px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #view-channels .category-pills::-webkit-scrollbar {
    display: none;
  }

  #view-channels .pill-btn {
    flex: 0 1 auto;
    justify-content: center;
    height: 40px;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    gap: 0;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    min-width: 0;
    border-radius: 0;
  }

  #view-channels .pill-icon {
    display: none;
  }

  /* 모바일 커뮤니티: 채널카드는 숨기고 탭 바로 아래 게시글 */

  #view-channels .community-filter-posts {
    margin-top: 0;
  }

  #view-channels .category-pills-container {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
  }

  #view-channels .category-pills-container > .community-sort {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    margin-bottom: 0;
    justify-content: flex-end;
  }

  #view-channels .community-list-toolbar {
    justify-content: flex-end;
    margin: 0;
  }

  #view-channels .community-list-toolbar.is-search {
    display: flex;
    justify-content: space-between;
  }

  #view-channels .community-sort-label,
  #view-channel-board .community-sort-label {
    display: none;
  }

  #view-channels .community-sort-select,
  #view-channel-board .community-sort-select {
    height: 26px;
    min-width: 88px;
    font-size: 11px;
  }

  #view-channels .community-filter-posts-header:not(.is-search) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #view-channels .community-mobile-section {
    margin: 0 0 18px;
  }

  #view-channels .community-mobile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
  }

  #view-channels .community-mobile-section-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
  }

  #view-channels .community-mobile-more-btn {
    padding: 4px 2px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  #view-channels .community-mobile-section-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-card,
  #view-channels .community-mobile-section-list .feed-post-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 2px;
    margin: 0;
    border: none;
    border-bottom: 1px solid #eceff1;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-card:hover,
  #view-channels .community-mobile-section-list .feed-post-card:hover {
    background-color: #f8f9fa;
    border-color: #eceff1;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-main,
  #view-channels .community-mobile-section-list .feed-post-main {
    flex: 1 1 auto;
    min-width: 0;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-header,
  #view-channels .community-mobile-section-list .post-header {
    margin-bottom: 4px;
    font-size: 11px;
    gap: 8px;
  }

  /* 세부 채널 마크: 닉네임 앞 초록 배지 */
  #view-channels #community-filter-posts-list.community-mobile-feed .post-channel,
  #view-channels .community-mobile-section-list .post-channel {
    color: #205b4c;
    background: rgba(32, 91, 76, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    border-left: none;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-channel.icon-bubble,
  #view-channels .community-mobile-section-list .post-channel.icon-bubble {
    background-color: var(--badge-sky-bg);
    color: var(--badge-sky-fg);
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-channel.icon-menu-plan,
  #view-channels .community-mobile-section-list .post-channel.icon-menu-plan {
    background-color: var(--badge-workchat-bg);
    color: var(--badge-workchat-fg);
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-channel.icon-thumb,
  #view-channels .community-mobile-section-list .post-channel.icon-thumb {
    background-color: var(--badge-pink-bg);
    color: var(--badge-pink-fg);
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-channel.icon-public-org,
  #view-channels .community-mobile-section-list .post-channel.icon-public-org {
    background-color: var(--badge-rose-bg);
    color: var(--badge-rose-fg);
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-title,
  #view-channels .community-mobile-section-list .post-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    color: #111;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-body-row,
  #view-channels .community-mobile-section-list .post-body-row {
    margin-bottom: 6px;
    gap: 0;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-content,
  #view-channels .community-mobile-section-list .post-content {
    font-size: 12.5px;
    color: #868e96;
    line-height: 1.4;
    margin: 0;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .post-footer,
  #view-channels .community-mobile-section-list .post-footer {
    border-top: none;
    padding-top: 0;
    gap: 10px;
    font-size: 11.5px;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-thumb,
  #view-channels .community-mobile-section-list .feed-post-thumb {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 8px;
    margin: 0;
    align-self: center;
    flex-shrink: 0;
  }

  /* 모바일: 썸네일 없는 글은 빈 칸을 두지 않고 제목·미리보기를 오른쪽 끝까지 사용 */
  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-card:not(.has-thumb)::after,
  #view-channels .community-mobile-section-list .feed-post-card:not(.has-thumb)::after {
    display: none;
    content: none;
    flex: 0 0 0;
    width: 0;
    height: 0;
    min-width: 0;
  }

  #view-channels #community-filter-posts-list.community-mobile-feed .feed-post-thumb img,
  #view-channels .community-mobile-section-list .feed-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* 모바일 하단 메뉴 (누티스쿨과 동일한 아이콘 + 글자) */
  .mobile-sub-nav.mobile-bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    border-bottom: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1002;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    overflow: hidden;
    padding: 0 2px env(safe-area-inset-bottom, 0px);
    gap: 0;
    box-sizing: border-box;
  }

  .mobile-sub-nav.mobile-bottom-nav [data-target="view-chat"] {
    display: none !important;
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 1px 4px;
    color: var(--text-main);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.15s ease;
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-bottom-nav-icon,
  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    flex-shrink: 0;
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn span {
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn:hover,
  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn.active {
    color: var(--primary-color);
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn.active::after {
    display: none;
  }

  .mobile-sub-nav.mobile-bottom-nav .mobile-sub-tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 0 0 2px 2px;
  }

  .mobile-overlay {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-sidebar {
    height: auto;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* 게시글 상세 댓글 입력 등이 하단 메뉴에 가리지 않도록 여유 확보 */
  #view-post-detail .detail-comments-section,
  #view-post-detail .detail-comment-form {
    scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Mobile search bar style */
  .mobile-search-bar {
    display: block;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-search-bar.is-hidden,
  .mobile-search-bar[hidden] {
    display: none !important;
  }
  
  .mobile-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f2f4f6;
    border-radius: 20px;
    height: 38px;
    padding: 0 16px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
  }
  
  .mobile-search-wrapper:focus-within {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
  }
  
  .mobile-search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    margin-right: 8px;
    flex-shrink: 0;
  }
  
  .mobile-search-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
  }

  /* Compact Channels Grid for Mobile — 채널 카드 반 너비 2열 */
  .channels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    column-gap: 6px;
    row-gap: 6px;
  }

  .channel-card {
    padding: 10px 8px;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid #f1f3f5;
    border-radius: 8px;
  }
  
  .channel-icon {
    width: 28px;
    height: 28px;
  }
  
  .channel-icon svg {
    width: 14px;
    height: 14px;
  }
  
  .channel-name {
    font-size: 12px;
    font-weight: 700;
    color: #222222;
  }
  
  .channel-meta {
    font-size: 10px;
    color: #94969b;
    margin-bottom: 4px;
  }
  
  .channel-desc {
    font-size: 11px;
    color: #4a4a4a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Compact Feed Cards for Mobile (게시판 디자인) */
  .feed-post-card {
    padding: 10px 12px;
    background-color: #ffffff;
    border: 1px solid #f1f3f5;
    border-radius: 12px;
  }
  
  .post-header {
    font-size: 11.5px;
    margin-bottom: 4px;
  }

  .post-channel {
    font-size: 11px;
    font-weight: 700;
    color: #205b4c;
    background: rgba(32, 91, 76, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    border-left: none;
    line-height: 1.4;
  }

  .post-channel.icon-bubble {
    background-color: var(--badge-sky-bg);
    color: var(--badge-sky-fg);
  }

  .post-channel.icon-menu-plan {
    background-color: var(--badge-workchat-bg);
    color: var(--badge-workchat-fg);
  }

  .post-channel.icon-thumb {
    background-color: var(--badge-pink-bg);
    color: var(--badge-pink-fg);
  }

  .post-channel.icon-public-org {
    background-color: var(--badge-rose-bg);
    color: var(--badge-rose-fg);
  }
  
  .post-author {
    color: #8c8c8c;
  }

  .post-date {
    color: #b5b5b5;
  }

  .post-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin-top: 0;
    margin-bottom: 4px;
    line-height: 1.35;
  }

  .post-body-row {
    gap: 12px;
    margin-bottom: 8px;
  }

  .feed-post-thumb {
    width: 104px;
    height: 104px;
    margin: 0;
    border-radius: 8px;
    align-self: center;
  }

  .feed-post-card:not(.has-thumb)::after {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
  }

  .board-post-thumb {
    width: 72px;
    height: 72px;
  }
  
  .post-content {
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .feed-post-card.has-thumb .post-content {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }


  .post-footer {
    border-top: 1px solid #f8f9fa;
    padding-top: 10px;
    font-size: 11.5px;
    color: #94969b;
  }

  .post-stat svg {
    width: 13px;
    height: 13px;
  }

  /* Compact School Reviews for Mobile */
  .review-card {
    padding: 16px;
  }

  .review-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .total-rating {
    align-items: flex-start;
  }
  
  .review-scores {
    max-width: 100%;
  }

  /* Recommended channels list can use full width on mobile stacked layout */
  .rec-info h5 {
    max-width: none;
  }

  /* Stacked Ads Grid for Mobile */
  .ad-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .ad-img-wrapper {
    height: 160px;
  }
  
  /* Mobile Login Modal Drawer (Bottom Sheet) */
  .modal-overlay {
    align-items: flex-end; /* Show at bottom */
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 36px 20px;
    transform: translateY(100%); /* Slide out from bottom */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .modal-overlay.active .modal-content {
    transform: translateY(0);
  }
  
  .modal-close {
    top: 16px;
    right: 20px;
  }

  .region-portal-link-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-banner-row {
    flex-direction: column;
  }

  .main-content {
    padding-top: 16px;
  }
}

/* Small Phone Mode (extra tightening for narrow devices) */
@media (max-width: 480px) {
  .top-bar-container,
  .header-container,
  .main-container,
  .footer-container {
    padding: 0 16px;
  }

  .header-container {
    padding-right: max(24px, calc(16px + env(safe-area-inset-right, 0px)));
  }

  .meal-feed-tabs {
    gap: 4px 4px;
  }

  .meal-feed-tab {
    font-size: 12px;
    letter-spacing: -0.04em;
  }

  #view-channels .category-pills {
    gap: 4px 3px;
  }

  #view-channels .pill-btn {
    font-size: 13px;
    letter-spacing: -0.04em;
  }

  .top-bar-link {
    font-size: 11px;
  }

  .logo-text .logo-title {
    font-size: 20px;
  }

  .view-title {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .view-subtitle {
    margin-top: -12px;
    margin-bottom: 18px;
  }

  #view-meal-feed .view-subtitle,
  #view-product-info .view-subtitle,
  #view-product-search .view-subtitle,
  #view-meal-calculator .view-subtitle {
    display: none;
  }

  #view-product-search .vendor-hub-list-head {
    gap: 0;
    margin-bottom: 16px;
  }

  #view-product-search .vendor-hub-list-head .write-btn {
    display: inline-flex;
  }

  #view-product-search .vendor-hub-list-head .header-search,
  #view-product-search .vendor-hub-list-head .product-lookup-search {
    width: auto;
    max-width: none;
    margin: 0 !important;
  }

  #view-meal-feed .board-header,
  #view-product-info .board-header {
    align-items: center;
    gap: 0 8px;
    margin-bottom: 0;
  }

  #view-meal-feed .board-header .view-title,
  #view-product-info .board-header .view-title {
    margin-bottom: 0;
  }

  #view-meal-feed .board-header .write-btn,
  #view-product-info .board-header .write-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    flex-shrink: 0;
  }

  .pill-btn {
    height: 34px;
    padding: 0;
    font-size: 14px;
    border-radius: 0;
  }

  .channel-card {
    padding: 8px 6px;
    gap: 6px;
  }

  .review-search-container {
    padding: 16px;
  }

  .review-search-box {
    height: 44px;
    padding: 0 12px 0 16px;
  }

  .school-name {
    font-size: 15.5px;
  }

  .score-label {
    width: 62px;
    font-size: 11.5px;
  }

  .score-bar {
    margin: 0 8px;
  }

  .ad-img-wrapper {
    height: 140px;
  }

  .ad-info {
    padding: 16px;
  }

  .ad-name {
    font-size: 14.5px;
  }

  .modal-content {
    padding: 20px 16px 28px 16px;
  }

  .promo-card {
    height: 150px;
  }
}

/* ==========================================================================
   급식계산기 · 급식량 계산기 (Meal Calculator)
   ========================================================================== */
.meal-calc-view .board-header > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meal-calc-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.meal-calc-title-row .view-title {
  margin: 0;
}

.meal-calc-help-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.meal-calc-help-toggle:hover,
.meal-calc-help-toggle[aria-expanded="true"] {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #fff8f8;
}

.meal-calc-help-toggle-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

/* 사용방법 동영상 모달 */
.meal-calc-guide-overlay {
  z-index: 4200;
}

.meal-calc-guide-content {
  width: min(662px, 94vw);
  max-width: min(662px, 94vw);
  padding: 18px 18px 20px;
}

.meal-calc-guide-content .modal-close {
  top: 12px;
  right: 12px;
  z-index: 1;
}

.meal-calc-guide-header {
  margin-bottom: 14px;
  padding-right: 32px;
  text-align: left;
}

.meal-calc-guide-header h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.meal-calc-guide-player {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
}

.meal-calc-guide-video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #000000;
}

.meal-calc-guide-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66px;
  height: 66px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.meal-calc-guide-play:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: scale(1.05);
}

.meal-calc-guide-play[hidden] {
  display: none;
}

.meal-calc-guide-play-icon {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #ffffff;
}

.meal-calc-help-hint {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  word-break: keep-all;
}

.meal-calc-help-panel {
  margin-top: 8px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  min-width: 0;
}

.meal-calc-help-heading {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-help-lead,
.meal-calc-help-step p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-sub);
  word-break: keep-all;
}

.meal-calc-help-step {
  margin-top: 14px;
}

.meal-calc-help-step h4,
.meal-calc-help-example-flow h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-help-example {
  margin: 8px 0;
  padding: 10px 12px;
  background: #fff8f8;
  border: 1px solid #f1e4e4;
  border-radius: 10px;
}

.meal-calc-help-example strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-main);
}

.meal-calc-help-example p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-sub);
}

.meal-calc-help-example p + p {
  margin-top: 6px;
}

.meal-calc-help-example-note {
  color: #868e96 !important;
}

.meal-calc-help-example-flow {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.meal-calc-help-example-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-help-flow {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meal-calc-help-flow li {
  position: relative;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-sub);
  word-break: keep-all;
}

.meal-calc-help-flow-pc li {
  text-align: left;
}

.meal-calc-help-flow-pc li:not(:last-child)::after {
  content: "↓";
  display: block;
  margin: 4px 0;
  color: var(--primary-color);
  font-weight: 700;
}

.meal-calc-help-flow-mobile {
  display: none;
}

.meal-calc-help-flow-mobile li {
  text-align: center;
}

.meal-calc-help-flow-mobile li:not(:last-child)::after {
  content: "↓";
  display: block;
  margin: 4px 0;
  color: var(--primary-color);
  font-weight: 700;
}

.meal-calc-view .board-back-btn {
  margin-bottom: 2px;
}

.meal-calc-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

/* PC: 네비는 유지하고 급식량 계산기 본문만 약 25% 좁혀 가운데 정렬 */
@media (min-width: 769px) {
  .meal-calc-view .board-header,
  .meal-calc-view .meal-calc-layout {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
  }

  .meal-calc-view .meal-calc-card {
    width: 100%;
  }
}

.meal-calc-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px 24px;
}

.meal-calc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.meal-calc-card-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-card-header h3 i {
  width: 18px;
  height: 18px;
  color: var(--secondary-color);
  stroke-width: 2.2px;
}

.meal-calc-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.meal-calc-school-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meal-calc-menu-combo {
  position: relative;
  display: block;
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 280px;
}

.meal-calc-menu-combo-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  /* 오른쪽 화살표(12~16px 여백) 공간 확보 */
  padding-right: 36px;
}

.meal-calc-menu-combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0 8px 8px 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.meal-calc-menu-combo-toggle:hover {
  background: transparent;
}

.meal-calc-menu-combo-caret {
  position: absolute;
  /* 배식 횟수 select처럼 입력창 안쪽 오른쪽 12~16px, 세로 중앙 */
  right: 14px;
  top: 50%;
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transform: translateY(-50%);
  transform-origin: center center;
}

.meal-calc-menu-combo.is-open .meal-calc-menu-combo-caret {
  transform: translateY(-50%) rotate(180deg);
}

.meal-calc-tabs-header,
.meal-calc-tabs-actions,
.meal-calc-tabs-field-menu {
  overflow: visible;
}

.meal-calc-menu-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.meal-calc-menu-combo-list[hidden] {
  display: none !important;
}

.meal-calc-menu-combo-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.meal-calc-menu-combo-option {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 8px 36px 8px 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  cursor: pointer;
}

.meal-calc-menu-combo-option-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-calc-menu-combo-option:hover,
.meal-calc-menu-combo-option.is-selected {
  background: #fff5f5;
  color: var(--primary-color);
}

.meal-calc-menu-combo-delete {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 1;
  transition: var(--transition-fast);
}

.meal-calc-menu-combo-delete:hover {
  background: #fff5f5;
  border-color: #ffc9c9;
  color: #e03131;
}

.meal-calc-menu-combo-delete i {
  width: 12px;
  height: 12px;
  stroke-width: 2.6px;
  pointer-events: none;
}

.meal-calc-menu-combo-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.meal-calc-select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 12px;
  font-size: 13.5px;
  font-family: inherit;
  background-color: #ffffff;
  color: var(--text-main);
}

.meal-calc-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.meal-calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-calc-btn i {
  width: 15px;
  height: 15px;
  stroke-width: 2.3px;
}

.meal-calc-btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.meal-calc-btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.meal-calc-btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.meal-calc-btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #ffffff;
}

.meal-calc-btn-secondary:hover {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
}

.meal-calc-tabs-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.meal-calc-tabs-field-mode {
  width: 100%;
  max-width: 560px;
}

.meal-calc-mode-select,
#meal-calc-mode-select {
  width: 100%;
  max-width: 100%;
  height: 38px;
  box-sizing: border-box;
}

.meal-calc-tabs-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.meal-calc-tabs-serve-fields {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.meal-calc-tabs-serve-fields[hidden] {
  display: none !important;
}

.meal-calc-tabs-field {
  margin-bottom: 0;
  min-width: 0;
}

.meal-calc-tabs-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.meal-calc-tabs-field input[type="text"],
.meal-calc-tabs-field input[type="number"] {
  height: 34px;
  min-width: 96px;
  width: 120px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
}

.meal-calc-tabs-field-menu {
  min-width: 160px;
}

.meal-calc-tabs-field-menu .meal-calc-menu-combo {
  position: relative;
  display: block;
  flex: 0 1 auto;
  width: 180px;
  max-width: 240px;
  min-width: 150px;
}

/* .meal-calc-tabs-field input[type="text"] { width:120px } 보다 우선해 입력창을 콤보 전체 너비로 */
.meal-calc-tabs-field-menu .meal-calc-menu-combo input[type="text"].meal-calc-menu-combo-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  padding: 0 36px 0 10px;
  font-size: 13px;
  font-family: inherit;
}

.meal-calc-tabs-field-amount {
  min-width: 150px;
}

.meal-calc-tabs-field-waste input[type="number"] {
  width: 72px;
  min-width: 64px;
}

.meal-calc-tabs-field-amount .product-spec-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meal-calc-tabs-field-amount .product-spec-row input {
  width: 80px;
  min-width: 0;
  flex: 1 1 auto;
}

.meal-calc-tabs-field-amount .product-spec-row select {
  height: 34px;
  flex: 0 0 auto;
  width: auto;
  min-width: 4.4em;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 1.75em 0 8px;
  font-size: 13px;
  background: #fff;
  appearance: auto;
  -webkit-appearance: menulist;
}

.meal-calc-tabs-field-piece {
  min-width: 108px;
}

.meal-calc-piece-g-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meal-calc-piece-g-row input[type="number"] {
  width: 80px;
  min-width: 0;
  flex: 1 1 auto;
}

.meal-calc-tabs-field-piece[hidden] {
  display: none !important;
}

#meal-calc-order-amount,
.meal-calc-order-amount-input {
  background-color: #fff0f3;
  border-color: #ffc2d1;
}

#meal-calc-order-amount:focus,
.meal-calc-order-amount-input:focus {
  outline: none;
  border-color: #ff8fab;
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.18);
}

#meal-calc-order-unit,
#meal-calc-serve-unit {
  flex: 0 0 auto;
  width: auto;
  min-width: 4.4em;
  padding: 0 1.75em 0 8px;
}

.meal-calc-tabs-actions .meal-calc-btn-primary {
  height: 34px;
  min-width: 64px;
  padding: 0 12px;
}

.meal-calc-panel-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meal-calc-panel-actions .meal-calc-btn-primary {
  min-width: 72px;
  height: 36px;
  padding: 0 16px;
}

.meal-calc-standard-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}

.meal-calc-recent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.meal-calc-recent-label {
  flex: 0 0 auto;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.meal-calc-recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meal-calc-recent-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.meal-calc-recent-chip:hover,
.meal-calc-recent-chip.is-active {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.meal-calc-my-standard {
  border: 1px solid #cfe8c4;
  background: #f6fbf3;
  border-radius: 10px;
  padding: 10px 12px;
}

.meal-calc-my-standard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.meal-calc-my-standard-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.meal-calc-my-standard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meal-calc-my-standard-empty,
.meal-calc-my-standard-recent,
.meal-calc-my-standard-avg,
.meal-calc-my-standard-date {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.45;
}

.meal-calc-my-standard-empty {
  color: var(--text-muted);
}

.meal-calc-mobile-only {
  display: none;
}

.meal-calc-menu-combo-option-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.meal-calc-menu-combo-option-meta {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.meal-calc-help-hover {
  position: relative;
  display: inline-flex;
}

.meal-calc-help-card {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 260px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 30;
  text-align: left;
}

.meal-calc-help-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.meal-calc-help-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  line-height: 1.5;
}

.meal-calc-help-hover:hover .meal-calc-help-card,
.meal-calc-help-hover:focus-within .meal-calc-help-card {
  display: block;
}

.meal-calc-breakdown-modal-content {
  max-width: 560px;
  width: calc(100% - 32px);
}

.meal-calc-history-modal-content {
  max-width: 960px;
  width: calc(100% - 48px);
}

.meal-calc-history-avg {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 14px;
}

.meal-calc-history-avg-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #868e96;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.meal-calc-history-avg p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
}

#meal-calc-history-avg-summary {
  display: none;
}

.meal-calc-history-apply-short {
  display: none;
}

.meal-calc-history-list {
  max-height: min(62vh, 480px);
  overflow: auto;
  margin: 8px 0 4px;
}

.meal-calc-history-mobile {
  display: none;
}

.meal-calc-history-table-wrap {
  overflow-x: auto;
}

.meal-calc-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.meal-calc-history-table th,
.meal-calc-history-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #ececec;
  white-space: nowrap;
  vertical-align: middle;
}

.meal-calc-history-table th:first-child,
.meal-calc-history-table td:first-child {
  text-align: left;
}

.meal-calc-history-table th {
  color: #868e96;
  font-weight: 600;
  font-size: 12.5px;
}

.meal-calc-history-table tbody tr:last-child td {
  border-bottom: none;
}

.meal-calc-history-table .meal-calc-history-item-actions {
  justify-content: center;
}

.meal-calc-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.meal-calc-history-item-main p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.meal-calc-history-item-date {
  font-size: 13px;
  font-weight: 800;
}

.meal-calc-history-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.meal-calc-history-footer {
  display: none;
}

.meal-calc-breakdown-list {
  margin: 8px 0 12px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
}

.meal-calc-breakdown-total {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .meal-calc-my-standard-actions .meal-calc-btn:not(.meal-calc-mobile-only) {
    display: none;
  }

  .meal-calc-mobile-only {
    display: inline-flex;
  }

  .meal-calc-help-card {
    right: auto;
    left: 0;
    width: min(260px, calc(100vw - 48px));
  }

  .meal-calc-history-avg {
    display: block;
  }

  .meal-calc-history-avg-badge {
    background: #e8f6e3;
    color: #2f7a3e;
  }

  .meal-calc-history-avg p {
    margin: 8px 0 0;
  }

  #meal-calc-history-avg-summary {
    display: block;
  }

  .meal-calc-history-avg-full {
    display: none;
  }

  .meal-calc-history-table-wrap {
    display: none;
  }

  .meal-calc-history-mobile {
    display: flex;
    flex-direction: column;
  }

  .meal-calc-history-item {
    flex-direction: row;
    align-items: center;
    border: none;
    border-radius: 0;
    padding: 14px 14px;
    background: transparent;
  }

  .meal-calc-history-apply-full {
    display: none;
  }

  .meal-calc-history-apply-short {
    display: inline;
  }

  .meal-calc-history-delete {
    display: none;
  }

  .meal-calc-history-list {
    margin: 0 0 16px;
    overflow: visible;
    max-height: none;
  }

  .meal-calc-history-mobile {
    overflow: auto;
    max-height: min(48vh, 360px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
  }

  .meal-calc-history-item + .meal-calc-history-item {
    border-top: 1px solid #ececec;
  }

  .meal-calc-history-item-main p {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--text-main);
  }

  .meal-calc-history-item-date {
    font-size: 13.5px;
    font-weight: 700;
  }

  .meal-calc-history-item-actions .meal-calc-btn {
    min-width: 52px;
    justify-content: center;
    border-radius: 10px;
  }

  .meal-calc-history-footer {
    display: block;
  }

  .meal-calc-history-footer .meal-calc-btn {
    width: 100%;
    justify-content: center;
    height: 44px;
    border-radius: 12px;
  }

  .meal-calc-history-modal-content .modal-header-desc {
    margin-bottom: 12px;
    padding-right: 28px;
  }

  .meal-calc-history-modal-content .modal-header-desc h3 {
    font-size: 18px;
    font-weight: 800;
  }
}

@media (max-width: 768px) {
  #meal-calc-history-modal {
    align-items: center;
    padding: 16px;
  }

  #meal-calc-history-modal .meal-calc-history-modal-content {
    width: calc(100% - 8px);
    max-width: 400px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 20px;
    padding: 22px 18px 18px;
    transform: scale(0.96) translateY(8px);
  }

  #meal-calc-history-modal.active .meal-calc-history-modal-content {
    transform: scale(1) translateY(0);
  }

  #meal-calc-history-modal .modal-close {
    top: 16px;
    right: 14px;
  }
}

/* 배식량 계산 카드: 고정/최소 높이 제거, 내용 높이에 맞춤 */
.meal-calc-tabs-card {
  min-height: 0;
  height: auto;
  padding-bottom: 22px; /* 저장 버튼 아래 약 20~24px */
}

#meal-calc-mode-serve {
  min-height: 0;
  height: auto;
}

#meal-calc-mode-serve .meal-calc-table {
  margin-bottom: 0;
}

#meal-calc-mode-serve .meal-calc-panel-actions {
  margin-top: 18px; /* 나머지 행 아래 약 16~20px */
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .meal-calc-tabs-header {
    flex-wrap: nowrap;
  }

  .meal-calc-tabs-field-mode {
    max-width: none;
  }

  .meal-calc-tabs-actions,
  .meal-calc-tabs-serve-fields {
    flex-wrap: wrap;
  }
}

.meal-calc-table-ratio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meal-calc-table-ratio-wrap .meal-calc-table-input {
  width: 72px;
  text-align: right;
}

.meal-calc-btn-outline {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: var(--text-sub);
}

.meal-calc-btn-outline:hover {
  border-color: #ced4da;
  color: var(--text-main);
}

.meal-calc-btn-danger {
  background-color: #fff5f5;
  border-color: #ffc9c9;
  color: #e03131;
}

.meal-calc-btn-danger:hover {
  background-color: #ffe3e3;
}

.meal-calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 12px;
  margin-bottom: 10px;
}

.meal-calc-menu-name-group {
  grid-column: 1 / -1;
}

.meal-calc-menu-name-group .meal-calc-school-toolbar {
  width: 100%;
}

.meal-calc-menu-name-group .meal-calc-menu-combo {
  flex: 1 1 220px;
  max-width: none;
}

/* 급식 정보: 학교급 · 배식 횟수를 인원 그룹 위에 배치 */
#meal-calc-headcount-card .meal-calc-headcount-meta-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin-bottom: 10px;
}

#meal-calc-headcount-card .meal-calc-headcount-meta-grid > .form-group {
  margin-bottom: 0;
  flex: 0 1 180px;
  max-width: 220px;
  min-width: 140px;
}

#meal-calc-headcount-card .meal-calc-headcount-meta-grid .meal-calc-select {
  width: 100%;
}

/* 메뉴 정보: 메뉴명 · 버튼을 한 줄로 */
#meal-calc-school-card .meal-calc-form-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px 10px;
}

#meal-calc-school-card .meal-calc-form-grid > .form-group {
  margin-bottom: 0;
  min-width: 0;
}

#meal-calc-school-card .meal-calc-menu-name-group {
  grid-column: auto;
  flex: 1 1 auto;
  min-width: 0;
}

#meal-calc-school-card .meal-calc-menu-name-group .meal-calc-school-toolbar {
  flex-wrap: nowrap;
  width: 100%;
}

#meal-calc-school-card .meal-calc-menu-name-group .meal-calc-menu-combo {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: none;
}

#meal-calc-school-card .meal-calc-menu-name-group .meal-calc-btn-sm {
  flex: 0 0 auto;
}

.meal-calc-form-grid .form-group select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  background-color: #ffffff;
}

.meal-calc-form-grid .form-group label {
  margin-bottom: 4px;
  font-size: 12px;
}

.meal-calc-headcount-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.meal-calc-headcount-toolbar-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.meal-calc-headcount-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.meal-calc-group-add-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

#meal-calc-headcount-card .meal-calc-headcount-meta-grid {
  justify-content: space-between;
}

.meal-calc-headcount-meta-left,
.meal-calc-headcount-meta-right {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}

.meal-calc-headcount-meta-right {
  margin-left: auto;
}

.meal-calc-neis-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.meal-calc-neis-status {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.meal-calc-neis-status.is-error {
  color: #c92a2a;
}

.meal-calc-neis-status.is-progress {
  color: #c92a2a;
  font-weight: 700;
}

.meal-calc-neis-status.is-success {
  color: #2b8a3e;
}

.meal-calc-neis-status.is-warn {
  color: #c77c00;
}

.meal-calc-headcount-item {
  border-style: dashed;
}

.meal-calc-headcount-drag-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 2px;
  cursor: grab;
  touch-action: none;
}

.meal-calc-headcount-drag-handle span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #adb5bd;
}

body.meal-calc-neis-grabbing,
body.meal-calc-neis-grabbing .meal-calc-headcount-drag-handle {
  cursor: grabbing;
}

.meal-calc-headcount-item.is-dragging {
  opacity: 0.55;
}

.meal-calc-headcount-item.is-low-confidence .meal-calc-headcount-count {
  border-color: #f08c00;
  background: #fff9db;
  box-shadow: 0 0 0 2px rgba(240, 140, 0, 0.18);
}

.meal-calc-headcount-drop-placeholder {
  min-height: 46px;
  border: 1px dashed var(--primary-color);
  border-radius: 8px;
  background: rgba(230, 57, 70, 0.06);
}

.meal-calc-neis-example-image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  cursor: zoom-in;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.meal-calc-neis-example-image.is-zoomed {
  max-height: none;
  cursor: zoom-out;
}

.meal-calc-neis-overwrite-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.meal-calc-neis-modal[hidden] {
  display: none !important;
}

.meal-calc-neis-modal.active {
  display: flex;
}

@media (max-width: 560px) {
  .meal-calc-headcount-meta-right {
    margin-left: 0;
    width: 100%;
  }
}

.meal-calc-headcount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.meal-calc-headcount-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 6px 6px;
  min-width: 0;
}

.meal-calc-headcount-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-calc-headcount-remove:hover {
  background-color: #fff5f5;
  border-color: #ffc9c9;
  color: #e03131;
}

.meal-calc-headcount-remove i {
  width: 10px;
  height: 10px;
  stroke-width: 2.6px;
}

.meal-calc-headcount-name {
  display: block;
  height: 16px;
  width: calc(100% - 34px);
  margin-left: 16px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  touch-action: manipulation;
}

input.meal-calc-headcount-name {
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  overflow: visible;
  text-overflow: clip;
  cursor: text;
  border-radius: 0;
  box-sizing: border-box;
}

input.meal-calc-headcount-name:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}

.meal-calc-headcount-count {
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  padding: 0 4px;
  font-size: 12.5px;
  background-color: #ffffff;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.meal-calc-headcount-count::placeholder {
  color: #adb5bd;
  font-weight: 500;
}

.meal-calc-headcount-count:focus {
  outline: none;
  border-color: var(--primary-color);
}

.meal-calc-headcount-empty,
.meal-calc-ratio-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 2px;
  grid-column: 1 / -1;
}

.meal-calc-headcount-round {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.meal-calc-headcount-round-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  line-height: 1.2;
}

.meal-calc-headcount-round-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

#meal-calc-headcount-card.meal-calc-card,
#meal-calc-school-card.meal-calc-card {
  padding: 14px 16px;
}

/* 급식 정보 칸: 호버 시 회색 배경 */
#meal-calc-headcount-card.meal-calc-card {
  transition: background-color 0.15s ease;
}

#meal-calc-headcount-card.meal-calc-card:hover {
  background-color: #f2f4f6;
}

#meal-calc-headcount-card .meal-calc-card-header,
#meal-calc-school-card .meal-calc-card-header {
  margin-bottom: 8px;
}

#meal-calc-headcount-card .meal-calc-collapse-toggle h3,
#meal-calc-leftover-card .meal-calc-collapse-toggle h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: inherit;
  color: inherit;
}

#meal-calc-headcount-card .meal-calc-btn-sm,
#meal-calc-school-card .meal-calc-btn-sm {
  height: 34px;
}

#meal-calc-headcount-card .meal-calc-select,
#meal-calc-school-card .meal-calc-select {
  height: 34px;
  font-size: 13px;
}

.meal-calc-headcount-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.meal-calc-collapsible-card .meal-calc-collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.meal-calc-collapsible-card .meal-calc-collapse-toggle h3 {
  margin: 0;
}

.meal-calc-headcount-header-main {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.meal-calc-headcount-header-main h3 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.meal-calc-headcount-empty-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #adb5bd;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-calc-collapse-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.18s ease;
}

.meal-calc-collapsible-card.is-collapsed .meal-calc-collapse-icon {
  transform: rotate(-90deg);
}

.meal-calc-collapsible-card .meal-calc-card-body {
  margin-top: 8px;
}

.meal-calc-collapsible-card.is-collapsed .meal-calc-card-body,
#meal-calc-headcount-card.is-collapsed .meal-calc-card-body {
  display: none;
}

.meal-calc-collapsible-card.is-collapsed .meal-calc-card-header,
#meal-calc-headcount-card.is-collapsed .meal-calc-card-header {
  margin-bottom: 0;
}

.meal-calc-school-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.meal-calc-school-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meal-calc-total-badge {
  font-size: 12.5px;
  color: var(--text-sub);
}

.meal-calc-total-badge strong {
  color: var(--primary-color);
  font-size: 14px;
  margin: 0 2px;
}

.meal-calc-ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.meal-calc-ratio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}

.meal-calc-ratio-item span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.meal-calc-ratio-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meal-calc-ratio-input-wrap input {
  width: 56px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 0 6px;
  font-size: 13px;
  text-align: right;
  background-color: #ffffff;
}

.meal-calc-ratio-input-wrap input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.meal-calc-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.meal-calc-mode-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 4px 12px;
  margin-right: 20px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-calc-mode-tab:hover {
  color: var(--text-main);
}

.meal-calc-mode-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.meal-calc-mode-panel {
  display: none;
}

.meal-calc-mode-panel.active {
  display: block;
}

.meal-calc-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.meal-calc-table thead th {
  background-color: #f1f3f5;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px 8px;
  line-height: 1.2;
  border-bottom: 1px solid var(--border-color);
}

.meal-calc-table tbody td {
  padding: 4px 8px;
  font-size: 12.5px;
  line-height: 1.25;
  color: var(--text-sub);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

/* 배식량 계산 표: 열 비율 33% / 32% / 34%, 가운데 정렬 */
#meal-calc-serve-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#meal-calc-serve-table th:nth-child(1),
#meal-calc-serve-table td:nth-child(1) {
  width: 28%;
}

#meal-calc-serve-table th:nth-child(2),
#meal-calc-serve-table td:nth-child(2) {
  width: 22%;
}

#meal-calc-serve-table th:nth-child(3),
#meal-calc-serve-table td:nth-child(3) {
  width: 25%;
}

#meal-calc-serve-table th:nth-child(4),
#meal-calc-serve-table td:nth-child(4) {
  width: 25%;
}

.meal-calc-serve-result-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}

.meal-calc-result-box.meal-calc-serve-round-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.meal-calc-result-box.meal-calc-serve-round-card[data-rounds="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meal-calc-result-box.meal-calc-serve-round-card[data-rounds="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meal-calc-serve-round-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
}

.meal-calc-serve-round-cell[hidden] {
  display: none;
}

.meal-calc-serve-round-cell + .meal-calc-serve-round-cell {
  border-left: 1px solid #ffc9c9;
}

.meal-calc-serve-round-cell .meal-calc-result-label {
  white-space: nowrap;
}

#meal-calc-serve-table thead th,
#meal-calc-serve-table tbody td {
  text-align: center;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

#meal-calc-serve-table td.meal-calc-table-group-name,
#meal-calc-serve-table th:nth-child(1) {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* 발주량 계산 표: 대상 한 줄 유지 + 열 균형
   대상 | 배식인원 | 1인 발주량 | 1인 섭취량 | 그룹별 섭취량 */
#meal-calc-order-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#meal-calc-order-table th:nth-child(1),
#meal-calc-order-table td:nth-child(1) {
  width: 16%;
  min-width: 3.2em;
}

#meal-calc-order-table th:nth-child(2),
#meal-calc-order-table td:nth-child(2) {
  width: 15%;
}

#meal-calc-order-table th:nth-child(3),
#meal-calc-order-table td:nth-child(3) {
  width: 18%;
}

#meal-calc-order-table th:nth-child(4),
#meal-calc-order-table td:nth-child(4) {
  width: 24%;
  padding-left: 4px;
  padding-right: 4px;
}

#meal-calc-order-table th:nth-child(5),
#meal-calc-order-table td:nth-child(5) {
  width: 27%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

#meal-calc-order-table td.meal-calc-table-group-name,
#meal-calc-order-table th:nth-child(1) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  overflow-wrap: normal;
}

#meal-calc-order-table .meal-calc-table-percapita-wrap,
#meal-calc-order-table .meal-calc-table-ratio-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
  vertical-align: middle;
  flex-wrap: nowrap;
}

#meal-calc-order-table .meal-calc-table-ratio-wrap .meal-calc-table-input {
  width: min(72px, 70%);
  max-width: 72px;
  text-align: center;
  box-sizing: border-box;
}

#meal-calc-order-table .meal-calc-unit-sign {
  flex: 0 0 auto;
  min-width: 1em;
}

/* 발주량 표 헤더: 데스크톱은 한 줄(기존), 모바일에서만 강제 2줄 */
#meal-calc-order-table .meal-calc-th-stack {
  display: inline;
}

#meal-calc-order-table .meal-calc-th-line {
  display: inline;
}

#meal-calc-order-table .meal-calc-th-gap {
  display: inline;
}

/* 급식인원 입력칸: 열 정중앙 */
#meal-calc-serve-table td:nth-child(2) .meal-calc-table-input {
  display: inline-block;
  width: min(84px, 92%);
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
}

/* 1인 배식량: 입력칸 + 단위를 한 그룹으로 열 가운데 정렬 */
#meal-calc-serve-table td:nth-child(3) {
  text-align: center;
}

#meal-calc-serve-table .meal-calc-table-percapita-wrap,
#meal-calc-serve-table .meal-calc-table-ratio-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
}

#meal-calc-serve-table .meal-calc-table-ratio-wrap .meal-calc-table-input {
  width: min(108px, 75%);
  max-width: 108px;
  text-align: center;
  box-sizing: border-box;
}

#meal-calc-serve-table .meal-calc-unit-sign {
  flex: 0 0 auto;
  min-width: 1em;
  text-align: left;
}

.meal-calc-table tbody tr:last-child td {
  border-bottom: none;
}

.meal-calc-table tbody tr.meal-calc-round-divider td {
  border-top: 2.5px solid #868e96;
}

#meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row td {
  background-color: #f1f3f5;
  font-weight: 600;
  color: var(--text-main);
  border-top: 1px solid #ced4da;
}

#meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row .meal-calc-table-group-name {
  font-weight: 700;
}

#meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row [data-role="round-subtotal-pop"] {
  font-weight: 600;
  color: var(--text-main);
}

#meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row .meal-calc-round-subtotal-amount {
  font-weight: 800;
  color: #212529;
  font-size: 13px;
  white-space: nowrap;
}

#meal-calc-serve-table tbody tr:has(+ .meal-calc-round-subtotal-row) td {
  border-bottom: none;
}

#meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row:has(+ .meal-calc-remain-row) td {
  border-bottom: none;
}

.meal-calc-table .meal-calc-table-group-name {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-table .meal-calc-table-highlight {
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-table-input-accent {
  font-weight: 700;
  color: var(--text-main);
}

.meal-calc-table-input-accent::placeholder {
  color: #adb5bd;
  font-weight: 600;
  opacity: 1;
}

.meal-calc-unit-sign {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 1.2em;
}

.meal-calc-remain-row td {
  background-color: #f8f9fa;
  border-top: 2px solid #868e96;
}

.meal-calc-remain-row .meal-calc-table-group-name {
  font-weight: 800;
  color: var(--text-main);
}

.meal-calc-remain-muted {
  color: var(--text-muted);
}

.meal-calc-remain-row.is-left .meal-calc-remain-value,
.meal-calc-remain-row.is-left [data-role="remaining"] {
  color: #2b8a3e;
}

.meal-calc-remain-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  max-width: 100%;
}

.meal-calc-remain-warning {
  font-size: 12px;
  font-weight: 700;
  color: #e03131;
  line-height: 1.3;
}

.meal-calc-remain-warning[hidden] {
  display: none !important;
}

.meal-calc-remain-row.is-short .meal-calc-remain-value,
.meal-calc-remain-row.is-short [data-role="remaining"],
.meal-calc-remain-row.is-short .meal-calc-remain-warning {
  color: #c92a2a;
}

.meal-calc-remain-row.is-short td.meal-calc-remain-value {
  background-color: #fff5f5;
}

@media (max-width: 560px) {
  .meal-calc-remain-warning {
    font-size: 11px;
  }
}

.meal-calc-table-input {
  width: 84px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 0 6px;
  font-size: 12.5px;
  text-align: center;
  background-color: #ffffff;
}

.meal-calc-table-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.meal-calc-table-empty td {
  color: var(--text-muted);
  padding: 20px 10px;
}

.meal-calc-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.meal-calc-result-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
}

.meal-calc-result-box-primary {
  background-color: #fff5f5;
  border-color: #ffc9c9;
}

#meal-calc-mode-serve .meal-calc-serve-result-grid {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

#meal-calc-mode-serve .meal-calc-serve-round-card {
  width: 100%;
}

.meal-calc-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.meal-calc-result-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
}

.meal-calc-result-box-primary .meal-calc-result-value {
  color: var(--primary-color);
}

.meal-calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 잔반 데이터 활용: 2열×2행 (1인당 증감 필요량 = 총 배식인원 오른쪽) */
#meal-calc-leftover-card .meal-calc-leftover-grid,
.meal-calc-leftover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: end;
  width: 100%;
  /* 웹: 칸이 카드 전체로 늘어나지 않도록 적당한 폭 유지 */
  max-width: 560px;
}

.meal-calc-leftover-grid > .form-group,
.meal-calc-leftover-grid > .meal-calc-leftover-result-box {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.meal-calc-leftover-grid .form-group input,
.meal-calc-leftover-grid .meal-calc-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.meal-calc-leftover-grid .meal-calc-select {
  height: 42px;
  text-overflow: ellipsis;
}

/* 1인당 증감 필요량: 총 배식인원 오른쪽 칸에 맞춰 입력창과 같은 높이로 */
.meal-calc-leftover-result-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  justify-content: flex-end;
}

.meal-calc-leftover-result-box .meal-calc-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.meal-calc-leftover-result-box .meal-calc-result-value {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background-color: #fff5f5;
  border: 1px solid #ffc9c9;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-color);
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-calc-leftover-guide {
  font-size: 13px;
  color: var(--text-sub);
  background-color: #fff9db;
  border: 1px solid #ffe066;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}

.meal-calc-leftover-guide:empty {
  display: none;
}

.meal-calc-copyright {
  display: block;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 12.5px;
  line-height: 1.55;
  color: #495057;
  text-align: left;
  word-break: keep-all;
}

@media (max-width: 900px) {
  .meal-calc-card {
    padding: 18px 16px;
  }

  .meal-calc-headcount-grid,
  .meal-calc-headcount-round-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .meal-calc-help-flow-pc {
    display: none;
  }

  .meal-calc-help-flow-mobile {
    display: block;
  }

  .meal-calc-help-panel {
    padding: 14px 12px;
  }

  .meal-calc-help-toggle {
    height: 26px;
    padding: 0 9px;
  }

  .meal-calc-guide-content {
    width: 100%;
    max-width: 100%;
    padding: 14px 12px 20px;
  }

  .meal-calc-guide-header {
    margin-bottom: 10px;
  }

  .meal-calc-guide-header h3 {
    font-size: 16px;
  }

  .meal-calc-guide-player {
    width: 100%;
  }

  .meal-calc-guide-video {
    width: 100%;
    height: auto;
    max-height: min(62vh, calc(100dvh - 130px));
  }

  .meal-calc-guide-play {
    width: 56px;
    height: 56px;
  }

  .meal-calc-guide-play-icon {
    border-width: 11px 0 11px 18px;
  }
}

@media (max-width: 560px) {
  /* 세로 여백 약 25~30% 축소: 한 화면에 더 많은 내용 */
  .meal-calc-view .board-header > div {
    gap: 4px;
  }

  .meal-calc-view .view-title {
    margin-bottom: 7px;
  }

  .meal-calc-layout {
    gap: 11px;
    margin-top: 8px;
  }

  .meal-calc-card {
    padding: 13px 12px;
  }

  #meal-calc-headcount-card.meal-calc-card,
  #meal-calc-school-card.meal-calc-card {
    padding: 10px 12px;
  }

  #meal-calc-headcount-card .meal-calc-card-header,
  #meal-calc-school-card .meal-calc-card-header {
    margin-bottom: 6px;
  }

  #meal-calc-headcount-card.is-collapsed .meal-calc-card-header {
    margin-bottom: 0;
  }

  .meal-calc-collapsible-card .meal-calc-card-body {
    margin-top: 6px;
  }

  .meal-calc-headcount-empty-hint {
    font-size: 11px;
  }

  .meal-calc-tabs-card {
    padding-top: 9px;
    padding-bottom: 16px;
  }

  .meal-calc-tabs-header {
    margin-bottom: 10px;
    gap: 8px;
  }

  .meal-calc-mode-select,
  #meal-calc-mode-select {
    height: 40px;
    font-size: 13px;
  }

  .meal-calc-card-desc {
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .meal-calc-table {
    margin-bottom: 12px;
  }

  .meal-calc-table thead th {
    padding: 4px 4px;
  }

  .meal-calc-table tbody td {
    padding: 3px 4px;
  }

  #meal-calc-mode-serve .meal-calc-panel-actions {
    margin-top: 12px;
  }

  /* 배식량 표: 대상 한 줄 + 열 비율 */
  #meal-calc-serve-table {
    table-layout: fixed;
    width: 100%;
  }

  #meal-calc-serve-table th:nth-child(1),
  #meal-calc-serve-table td:nth-child(1) {
    width: 26%;
  }

  #meal-calc-serve-table th:nth-child(2),
  #meal-calc-serve-table td:nth-child(2) {
    width: 22%;
  }

  #meal-calc-serve-table th:nth-child(3),
  #meal-calc-serve-table td:nth-child(3) {
    width: 24%;
  }

  #meal-calc-serve-table th:nth-child(4),
  #meal-calc-serve-table td:nth-child(4) {
    width: 28%;
  }

  #meal-calc-serve-table tbody tr.meal-calc-round-subtotal-row .meal-calc-round-subtotal-amount {
    font-size: 12.5px;
  }

  #meal-calc-serve-table thead th,
  #meal-calc-serve-table tbody td {
    padding: 3px 3px;
    font-size: 12px;
  }

  #meal-calc-serve-table th:nth-child(1),
  #meal-calc-serve-table td:nth-child(1),
  #meal-calc-serve-table td.meal-calc-table-group-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  #meal-calc-serve-table td:nth-child(2) .meal-calc-table-input {
    width: min(72px, 90%);
    height: 26px;
  }

  #meal-calc-serve-table .meal-calc-table-ratio-wrap .meal-calc-table-input {
    width: min(96px, 70%);
    height: 26px;
  }

  #meal-calc-serve-table .meal-calc-unit-sign {
    font-size: 12px;
  }

  /* 발주량 표: 대상 확보, 배식인원·발주량 오른쪽, 발주량↔섭취량 간격 축소 */
  #meal-calc-order-table {
    table-layout: fixed;
    width: 100%;
  }

  #meal-calc-order-table th:nth-child(1),
  #meal-calc-order-table td:nth-child(1) {
    width: 20%;
    min-width: 3.4em;
    padding-left: 4px;
    padding-right: 2px;
  }

  #meal-calc-order-table th:nth-child(2),
  #meal-calc-order-table td:nth-child(2) {
    width: 15%;
    padding-left: 6px;
    padding-right: 2px;
  }

  #meal-calc-order-table th:nth-child(3),
  #meal-calc-order-table td:nth-child(3) {
    width: 15%;
    padding-left: 2px;
    padding-right: 0;
  }

  #meal-calc-order-table th:nth-child(4),
  #meal-calc-order-table td:nth-child(4) {
    width: 23%;
    padding-left: 0;
    padding-right: 2px;
  }

  #meal-calc-order-table th:nth-child(5),
  #meal-calc-order-table td:nth-child(5) {
    width: 27%;
    padding-left: 2px;
    padding-right: 4px;
  }

  #meal-calc-order-table thead th,
  #meal-calc-order-table tbody td {
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 11px;
  }

  /* 결과표 헤더: 지정 위치에서만 2줄 (배식/인원, 1인/발주량 …) */
  #meal-calc-order-table thead th {
    text-align: center;
    vertical-align: middle;
    line-height: 1.15;
  }

  #meal-calc-order-table .meal-calc-th-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
  }

  #meal-calc-order-table .meal-calc-th-line {
    display: block;
  }

  #meal-calc-order-table .meal-calc-th-gap {
    display: none;
  }

  #meal-calc-order-table td.meal-calc-table-group-name,
  #meal-calc-order-table th:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  #meal-calc-order-table .meal-calc-table-ratio-wrap {
    gap: 2px;
  }

  #meal-calc-order-table .meal-calc-table-ratio-wrap .meal-calc-table-input {
    width: min(52px, 65%);
    max-width: 52px;
    height: 26px;
    padding: 0 3px;
    font-size: 12px;
  }

  #meal-calc-order-table .meal-calc-unit-sign {
    font-size: 11px;
    min-width: 0.85em;
  }

  /* 모바일: 카드 전체 폭을 쓰되 2열(약 50%) 유지 */
  #meal-calc-leftover-card .meal-calc-leftover-grid,
  .meal-calc-leftover-grid {
    max-width: none;
    align-items: stretch;
  }

  /* 잔반 영역: 라벨 같은 줄 + 입력/select/결과칸 높이 통일 */
  #meal-calc-leftover-card .meal-calc-leftover-grid > .form-group,
  #meal-calc-leftover-card .meal-calc-leftover-grid > .meal-calc-leftover-result-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 0;
  }

  #meal-calc-leftover-card .meal-calc-leftover-grid > .form-group > label,
  #meal-calc-leftover-card .meal-calc-leftover-result-box .meal-calc-result-label {
    margin: 0;
    margin-bottom: 0;
    min-height: 1.35em;
    line-height: 1.35;
    display: block;
  }

  #meal-calc-leftover-card .meal-calc-leftover-grid .form-group input,
  #meal-calc-leftover-card .meal-calc-leftover-grid .form-group select.meal-calc-select,
  #meal-calc-leftover-card .meal-calc-leftover-grid .meal-calc-select,
  #meal-calc-leftover-card .meal-calc-leftover-result-box .meal-calc-result-value {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    box-sizing: border-box;
    margin: 0;
  }

  #meal-calc-leftover-card .meal-calc-leftover-grid .form-group select.meal-calc-select,
  #meal-calc-leftover-card .meal-calc-leftover-grid .meal-calc-select {
    padding-top: 0;
    padding-bottom: 0;
    line-height: 42px;
    vertical-align: middle;
  }

  #meal-calc-leftover-card .meal-calc-leftover-result-box {
    justify-content: flex-start;
    padding: 0;
  }

  #meal-calc-leftover-card .meal-calc-leftover-result-box .meal-calc-result-value {
    display: flex;
    align-items: center;
  }

  .meal-calc-school-toolbar {
    width: 100%;
  }

  .meal-calc-tabs-header {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .meal-calc-tabs-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    padding-bottom: 6px;
  }

  .meal-calc-tabs-serve-fields {
    width: 100%;
    flex-wrap: wrap;
  }

  .meal-calc-tabs-field {
    flex: 1 1 calc(50% - 4px);
  }

  .meal-calc-tabs-field input[type="text"],
  .meal-calc-tabs-field input[type="number"] {
    width: 100%;
  }

  /* 배식량 계산: 메뉴명·총 발주량 나란히, 동일 너비 */
  #meal-calc-serve-toolbar.meal-calc-tabs-serve-fields {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-menu,
  #meal-calc-serve-toolbar .meal-calc-tabs-field-amount {
    flex: 1 1 0;
    width: 50%;
    min-width: 0;
    max-width: none;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-menu .meal-calc-menu-combo {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-amount .product-spec-row {
    width: 100%;
    min-width: 0;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-amount .product-spec-row input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-amount .product-spec-row select {
    flex: 0 0 auto;
    min-width: 48px;
  }

  /* 발주량 계산: 메뉴명·1인 평균 섭취량·폐기율 한 줄 */
  #meal-calc-order-toolbar.meal-calc-tabs-serve-fields {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field-menu,
  #meal-calc-order-toolbar .meal-calc-tabs-field-amount,
  #meal-calc-order-toolbar .meal-calc-tabs-field-waste,
  #meal-calc-order-toolbar .meal-calc-tabs-field-piece {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    min-width: 0;
    max-width: none;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field label {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field-menu .meal-calc-menu-combo {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field-amount .product-spec-row {
    width: 100%;
    min-width: 0;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field-amount .product-spec-row input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  #meal-calc-serve-toolbar .meal-calc-tabs-field-amount .product-spec-row select,
  #meal-calc-order-toolbar .meal-calc-tabs-field-amount .product-spec-row select,
  #meal-calc-order-toolbar #meal-calc-order-unit,
  #meal-calc-serve-toolbar #meal-calc-serve-unit {
    flex: 0 0 auto;
    width: auto;
    min-width: 4.4em;
    padding: 0 1.75em 0 8px;
  }

  #meal-calc-order-toolbar .meal-calc-piece-g-row input[type="number"] {
    width: 100%;
  }

  #meal-calc-order-toolbar .meal-calc-tabs-field-waste input[type="number"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .meal-calc-tabs-actions .meal-calc-btn-primary {
    flex: 1 1 auto;
  }

  #meal-calc-headcount-card .meal-calc-headcount-meta-grid > .form-group {
    flex: 1 1 calc(50% - 5px);
    max-width: none;
  }

  #meal-calc-school-card .meal-calc-form-grid {
    flex-wrap: wrap;
  }

  #meal-calc-school-card .meal-calc-menu-name-group {
    flex: 1 1 100%;
  }

  #meal-calc-school-card .meal-calc-menu-name-group .meal-calc-school-toolbar {
    flex-wrap: wrap;
  }

  .meal-calc-select {
    flex: 1 1 100%;
  }

  /* 발주량 결과: 폐기율 고려한 발주량 · 총 섭취량 한 줄, 동일 너비 */
  .meal-calc-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #meal-calc-mode-order .meal-calc-result-box {
    padding: 10px 10px;
    min-width: 0;
  }

  #meal-calc-mode-order .meal-calc-result-label {
    font-size: 11px;
    line-height: 1.25;
    word-break: keep-all;
  }

  #meal-calc-mode-order .meal-calc-result-value,
  #meal-calc-mode-serve .meal-calc-result-value {
    font-size: 16px;
  }

  .meal-calc-serve-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .meal-calc-serve-round-card[data-rounds="2"] .meal-calc-serve-round-cell,
  .meal-calc-serve-round-card[data-rounds="3"] .meal-calc-serve-round-cell {
    padding: 12px 8px;
  }
}

/* ==========================================================================
   Welcome Notice Popup (홈 최초 진입 안내)
   ========================================================================== */
.welcome-notice-overlay {
  background-color: rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
  z-index: 2100;
  align-items: center;
  justify-content: center;
}

.welcome-notice-content {
  width: 90%;
  max-width: 400px;
  padding: 36px 24px 8px;
  border-radius: 16px;
  transform: scale(0.95);
}

.welcome-notice-overlay.active .welcome-notice-content {
  transform: scale(1);
}

.welcome-notice-body {
  text-align: left;
  padding: 12px 4px 4px;
}

.welcome-notice-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  margin: 0 0 16px;
  text-align: center;
  word-break: keep-all;
}

.welcome-notice-body p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-sub);
  text-align: left;
  word-break: keep-all;
}

.welcome-notice-body p:last-child {
  margin-bottom: 0;
}

.welcome-notice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--border-color);
}

.welcome-notice-hide-today {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: -0.06em;
  gap: 4px;
}

.welcome-notice-hide-today span {
  letter-spacing: -0.06em;
}

.welcome-notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.welcome-notice-close-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex: 0 0 auto;
}

.welcome-notice-close-btn:hover {
  border-color: #ced4da;
  color: var(--text-main);
}

.welcome-notice-cta-btn {
  height: 40px;
  margin-top: 0;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background-color: var(--secondary-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex: 0 0 auto;
}

.welcome-notice-cta-btn:hover {
  background-color: var(--secondary-hover);
}

@media (max-width: 640px) {
  .welcome-notice-content {
    width: calc(100% - 32px);
    max-width: 320px;
    padding: 28px 16px 6px;
  }

  .welcome-notice-body {
    padding: 6px 0 0;
  }

  .welcome-notice-body h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .welcome-notice-body p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
  }

  .welcome-notice-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 5px;
    padding-top: 4px;
  }

  .welcome-notice-hide-today {
    white-space: normal;
  }

  .welcome-notice-actions {
    width: 100%;
    justify-content: stretch;
  }

  .welcome-notice-close-btn {
    flex: 0 0 auto;
    min-width: 64px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .welcome-notice-cta-btn {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
}

/* ==========================================================================
   급식레시피 게시판
   ========================================================================== */
.meal-recipe-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 22px;
}

.meal-recipe-filter-group {
  margin: 0;
}

/* 급식레시피 글쓰기: 칸 사이 여백 50% 축소 (기본 modal-form gap 16px → 8px) */
#meal-recipe-write-form.modal-form {
  gap: 8px;
}

#meal-recipe-write-form.is-excel-import .meal-recipe-write-manual-fields,
#meal-recipe-write-form.is-excel-import .meal-recipe-excel-template-guide,
.meal-recipe-write-manual-fields[hidden] {
  display: none !important;
}

.meal-recipe-meta-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 5px 6px;
  align-items: end;
  margin-bottom: 0;
}

.meal-recipe-meta-field {
  margin: 0;
  min-width: 0;
}

.meal-recipe-meta-field > label {
  display: block;
  margin-bottom: 6px;
  white-space: nowrap;
}

.meal-recipe-meta-field .multi-pick-trigger {
  min-height: 42px;
  padding: 6px 10px;
  font-size: 13px;
}

.meal-recipe-meta-serving .meal-recipe-serving-row {
  max-width: 220px;
  width: 100%;
}

.meal-recipe-meta-serving .meal-recipe-serving-row input {
  height: 42px;
  min-width: 0;
}

.meal-recipe-reaction-field {
  margin: 0;
}

.meal-recipe-reaction-field .meal-recipe-reaction-options {
  flex-wrap: wrap;
  gap: 8px;
}

.multi-pick {
  position: relative;
  width: 100%;
}

.multi-pick-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.multi-pick-trigger:hover,
.multi-pick.is-open .multi-pick-trigger {
  border-color: rgba(255, 75, 75, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.08);
}

.multi-pick-placeholder {
  color: var(--text-sub);
}

.multi-pick-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  color: var(--text-main);
  font-weight: 600;
}

.multi-pick-chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.multi-pick-chip-remove:hover {
  color: var(--primary-color);
}

.multi-pick-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.multi-pick-panel[hidden] {
  display: none !important;
}

.multi-pick-panel .product-allergy-chip-list {
  margin: 0;
}

.meal-recipe-serving-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
}

.meal-recipe-serving-row input {
  flex: 1 1 auto;
}

.meal-recipe-serving-unit {
  flex: 0 0 auto;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 14px;
}

.meal-recipe-reaction-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meal-recipe-reaction-btn {
  appearance: none;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.meal-recipe-reaction-btn:hover {
  background: rgba(255, 75, 75, 0.06);
  border-color: rgba(255, 75, 75, 0.35);
  color: var(--text-main);
}

.meal-recipe-reaction-btn.is-selected {
  background: rgba(255, 75, 75, 0.12);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

.meal-recipe-excel-error {
  color: var(--primary-color);
  font-weight: 600;
}

.meal-recipe-excel-import .write-extra-tools {
  flex-wrap: wrap;
}

.meal-recipe-excel-source-hint {
  margin-top: 8px;
  margin-bottom: 0;
}

.meal-recipe-excel-template-guide {
  margin-top: 8px;
  max-width: 560px;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  background: #f8f9fa;
  font-size: 12.5px;
  line-height: 1.45;
  color: #495057;
}

.meal-recipe-excel-template-guide summary {
  cursor: pointer;
  font-weight: 600;
  color: #343a40;
  list-style: none;
}

.meal-recipe-excel-template-guide summary::-webkit-details-marker {
  display: none;
}

.meal-recipe-excel-template-guide summary::before {
  content: '▸ ';
  color: #868e96;
}

.meal-recipe-excel-template-guide[open] summary::before {
  content: '▾ ';
}

.meal-recipe-excel-template-guide ol {
  margin: 8px 0 0;
  padding-left: 1.25em;
}

.meal-recipe-excel-template-guide-sub {
  list-style: none;
  margin-top: 4px !important;
  padding-left: 0.15em !important;
}

.meal-recipe-excel-template-guide li {
  margin: 2px 0;
}

.meal-recipe-excel-picker {
  margin-top: 10px;
  max-width: 560px;
}

.meal-recipe-excel-picker[hidden] {
  display: none !important;
}

.meal-recipe-excel-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  background: #f8f9fa;
  font-size: 13px;
  line-height: 1.4;
}

.form-group label.meal-recipe-excel-select-all,
.meal-recipe-excel-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #dc3545;
  -webkit-text-fill-color: #dc3545;
  user-select: none;
}

.form-group label.meal-recipe-excel-select-all span,
.meal-recipe-excel-select-all span {
  color: #dc3545;
  -webkit-text-fill-color: #dc3545;
}

.meal-recipe-excel-select-all input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary-color, #e85d4c);
}

.meal-recipe-excel-select-count {
  color: #6c757d;
  font-weight: 500;
}

.meal-recipe-excel-select-hint {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #343a40;
}

.meal-recipe-excel-select-hint[hidden] {
  display: none !important;
}

.meal-recipe-excel-recipe-list {
  max-height: min(280px, 40vh);
  overflow: auto;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  background: #fff;
}

.meal-recipe-excel-recipe-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f5;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #343a40;
}

.meal-recipe-excel-recipe-item:last-child {
  border-bottom: none;
}

.meal-recipe-excel-recipe-item:hover {
  background: #f8f9fa;
}

.meal-recipe-excel-recipe-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--primary-color, #e85d4c);
}

.meal-recipe-excel-recipe-item-text {
  flex: 1 1 auto;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .meal-recipe-excel-select-bar {
    gap: 6px 10px;
    padding: 8px;
  }

  .meal-recipe-excel-recipe-list {
    max-height: min(240px, 36vh);
  }
}

#meal-recipe-excel-btn.has-tooltip {
  position: relative;
}

#meal-recipe-excel-btn.has-tooltip:hover::after,
#meal-recipe-excel-btn.has-tooltip:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  max-width: min(320px, 80vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #212529;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

#meal-recipe-excel-btn.has-tooltip:hover::before,
#meal-recipe-excel-btn.has-tooltip:focus-visible::before {
  content: '';
  position: absolute;
  left: 18px;
  top: calc(100% + 2px);
  z-index: 31;
  border: 6px solid transparent;
  border-bottom-color: #212529;
  pointer-events: none;
}

#view-chat .chat-popout-btn.has-tooltip {
  position: relative;
}

#view-chat .chat-popout-btn.has-tooltip:hover::after,
#view-chat .chat-popout-btn.has-tooltip:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  max-width: min(240px, 80vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #212529;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

#view-chat .chat-popout-btn.has-tooltip:hover::before,
#view-chat .chat-popout-btn.has-tooltip:focus-visible::before {
  content: '';
  position: absolute;
  right: 10px;
  left: auto;
  top: calc(100% + 2px);
  z-index: 41;
  border: 6px solid transparent;
  border-bottom-color: #212529;
  pointer-events: none;
}

.meal-recipe-ingredients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.meal-recipe-ingredients-header label {
  margin: 0;
}

.meal-recipe-ingredients-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
}

.meal-recipe-ingredients-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

/* 식재료 칸 높이 약 20% 축소 */
.meal-recipe-ingredients-table th,
.meal-recipe-ingredients-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 13.5px;
  vertical-align: middle;
}

.meal-recipe-ingredients-table th {
  background: #f8f9fa;
  color: var(--text-sub);
  font-weight: 700;
}

.meal-recipe-ingredients-table tr:last-child td {
  border-bottom: 0;
}

.meal-recipe-ingredients-table input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.meal-recipe-ing-actions-col {
  width: 52px;
}

.meal-recipe-ing-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.meal-recipe-ing-remove:hover {
  color: var(--primary-color);
  background: rgba(255, 75, 75, 0.08);
}


#view-meal-recipe .board-header .write-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#view-meal-recipe .board-header .write-btn i,
#view-meal-recipe .board-header .write-btn svg {
  width: 15px;
  height: 15px;
}

.meal-recipe-board-wrap {
  width: 100%;
}

.meal-recipe-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.meal-recipe-board-grid[hidden],
.meal-recipe-board-table-mobile[hidden] {
  display: none !important;
}

.meal-recipe-board-table {
  margin-top: 0;
}

/* 급식레시피 목록 헤더: 홈 업무자료 카드와 동일한 연한 크림 노랑 */
.board-table.community-board-table.meal-recipe-board-table thead th {
  background-color: var(--badge-amber-bg);
}

.meal-recipe-board-table-mobile {
  display: none;
  margin-top: 0;
}

.meal-recipe-board-table-mobile .meal-recipe-chevron-cell {
  color: var(--text-muted);
  padding-right: 8px;
}

.meal-recipe-board-table-mobile .meal-recipe-chevron-cell i,
.meal-recipe-board-table-mobile .meal-recipe-chevron-cell svg {
  width: 16px;
  height: 16px;
}

.meal-recipe-board-table .meal-recipe-col-check {
  width: 36px;
  padding-left: 10px;
  padding-right: 4px;
  text-align: center;
  vertical-align: middle;
}

.meal-recipe-board-table .meal-recipe-col-school {
  width: 12%;
}

.meal-recipe-board-table .meal-recipe-col-title {
  width: 40%;
}

.meal-recipe-board-table .meal-recipe-col-author {
  width: 28%;
}

.meal-recipe-board-table .meal-recipe-col-views {
  width: 12%;
}

.meal-recipe-board-table .meal-recipe-col-chevron {
  width: 28px;
  padding: 0;
}

.meal-recipe-board-table tbody td.meal-recipe-check-cell {
  text-align: center;
  vertical-align: middle;
  padding-left: 10px;
  padding-right: 4px;
}

.meal-recipe-board-table .meal-recipe-col-check input[type="checkbox"],
.meal-recipe-board-table tbody td.meal-recipe-check-cell input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  accent-color: #2bbbad;
}

.meal-recipe-board-table tbody td.meal-recipe-school-cell {
  color: var(--text-sub);
  font-weight: 600;
  white-space: nowrap;
}

.meal-recipe-board-table tbody td.meal-recipe-title-cell {
  text-align: left;
  padding-left: 14px;
  color: var(--text-main);
  font-weight: 600;
}

.meal-recipe-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.meal-recipe-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.meal-recipe-new-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #2f80ed;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.meal-recipe-board-table tbody td.meal-recipe-author-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.meal-recipe-board-table tbody td.meal-recipe-author-cell .author-nickname-btn {
  display: inline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.meal-recipe-board-table tbody td.meal-recipe-views-cell {
  font-variant-numeric: tabular-nums;
}


#meal-recipe-empty-message {
  margin-top: 12px;
}

.meal-recipe-pagination {
  margin-top: 0;
}

.meal-recipe-list-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  min-height: 40px;
}

.meal-recipe-list-footer .meal-recipe-pagination {
  grid-column: 2;
  justify-self: center;
}

.meal-recipe-list-footer-actions {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meal-recipe-list-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meal-recipe-list-delete-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #ffa8a8;
  background: #fff5f5;
  color: #c92a2a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.meal-recipe-list-delete-btn[hidden] {
  display: none !important;
}

.meal-recipe-list-delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.meal-recipe-list-delete-btn:not(:disabled):hover {
  background: #ffe3e3;
}

.meal-recipe-pagination .meal-feed-page-btn.active {
  background-color: #2bbbad;
  border-color: #2bbbad;
}

.detail-meal-recipe {
  margin: 4px 0 18px;
}

.detail-meal-recipe-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.detail-meal-recipe-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  font-size: 14px;
}

.detail-meal-recipe-meta-label {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--text-sub);
  font-weight: 700;
}

.detail-meal-recipe-meta-value {
  color: var(--text-main);
  font-weight: 600;
}

.detail-meal-recipe-section {
  margin-bottom: 18px;
}

.detail-meal-recipe-heading {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.detail-meal-recipe-method,
.detail-meal-recipe-tip {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-main);
}

.detail-meal-recipe-body {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 18px;
}

.detail-meal-recipe-method-col {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

.detail-meal-recipe-ingredients-col {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.detail-meal-recipe-ingredients-table {
  width: auto;
  min-width: 0;
  table-layout: fixed;
}

/* 레시피 본문 식재료: 표는 왼쪽 정렬, 식품명은 1인량·폐기율 대비 약 3배 */
.detail-meal-recipe-section .meal-recipe-ingredients-table-wrap {
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
}

.detail-meal-recipe-ingredients-table th,
.detail-meal-recipe-ingredients-table td {
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-meal-recipe-ingredients-table th:nth-child(1),
.detail-meal-recipe-ingredients-table td:nth-child(1) {
  width: 264px;
  max-width: 264px;
}

.detail-meal-recipe-ingredients-table th:nth-child(2),
.detail-meal-recipe-ingredients-table td:nth-child(2),
.detail-meal-recipe-ingredients-table th:nth-child(3),
.detail-meal-recipe-ingredients-table td:nth-child(3) {
  width: 88px;
  max-width: 88px;
}

@media (max-width: 720px) {
  .detail-meal-recipe-body {
    flex-direction: column;
  }
}

.detail-meal-recipe-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.detail-meal-recipe-actions .write-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-meal-recipe-actions .write-tool-btn i,
.detail-meal-recipe-actions .write-tool-btn svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 900px) {
  .meal-recipe-board-grid {
    display: none;
  }

  .meal-recipe-board-table-mobile {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .meal-recipe-board-table-mobile thead th,
  .meal-recipe-board-table-mobile tbody td {
    white-space: nowrap;
    vertical-align: middle;
  }

  /* 모바일 목록: 체크 | 학교급 | 메뉴명 | 조회 (+chevron) — 작성자 숨김 */
  .meal-recipe-board-table-mobile .meal-recipe-col-author,
  .meal-recipe-board-table-mobile tbody td.meal-recipe-author-cell {
    display: none;
  }

  .meal-recipe-board-table-mobile .meal-recipe-col-check,
  .meal-recipe-board-table-mobile tbody td.meal-recipe-check-cell {
    width: 32px;
    max-width: 32px;
    padding-left: 6px;
    padding-right: 2px;
  }

  .meal-recipe-board-table-mobile .meal-recipe-col-school,
  .meal-recipe-board-table-mobile tbody td.meal-recipe-school-cell {
    width: 52px;
    max-width: 52px;
    padding-left: 4px;
    padding-right: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .meal-recipe-board-table-mobile .meal-recipe-col-title,
  .meal-recipe-board-table-mobile tbody td.meal-recipe-title-cell {
    width: auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    padding-left: 8px;
    padding-right: 8px;
  }

  .meal-recipe-board-table-mobile .meal-recipe-col-views,
  .meal-recipe-board-table-mobile tbody td.meal-recipe-views-cell {
    width: 44px;
    max-width: 44px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .meal-recipe-board-table-mobile .meal-recipe-col-chevron,
  .meal-recipe-board-table-mobile .meal-recipe-chevron-cell {
    width: 28px;
    max-width: 28px;
    padding-left: 0;
    padding-right: 6px;
  }

  .meal-recipe-board-table-mobile .meal-recipe-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .meal-recipe-board-table-mobile .meal-recipe-title-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .meal-recipe-board-table-mobile tbody tr.meal-recipe-row {
    height: 44px;
  }

  .meal-recipe-board-table-mobile tbody td {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .meal-recipe-list-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .meal-recipe-list-footer .meal-recipe-pagination {
    order: 1;
    justify-self: stretch;
  }

  .meal-recipe-list-footer-actions {
    order: 2;
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
  }

  .meal-recipe-list-download-btn,
  .meal-recipe-list-delete-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .meal-recipe-meta-row {
    grid-template-columns: 1fr 1fr;
  }

  .meal-recipe-meta-menu-name {
    grid-column: 1 / -1;
  }

  .meal-recipe-reaction-field .meal-recipe-reaction-btn {
    width: auto;
    flex: 1 1 calc(33.33% - 6px);
  }

  .meal-recipe-reaction-btn {
    width: auto;
    justify-content: center;
  }

  /* 급식레시피 게시판 모바일 상단: 제목·글쓰기 / 소개 / 검색 */
  #view-meal-recipe .meal-recipe-board-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title write"
      "subtitle subtitle"
      "search search";
    align-items: center;
    column-gap: 8px;
    row-gap: 6px;
    margin-bottom: 8px;
  }

  #view-meal-recipe .meal-recipe-header-text {
    display: contents;
  }

  #view-meal-recipe .meal-recipe-board-header .view-title {
    grid-area: title;
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    min-width: 0;
  }

  #view-meal-recipe .meal-recipe-board-header .write-btn {
    grid-area: write;
    margin: 0;
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  #view-meal-recipe .meal-recipe-board-header .view-subtitle {
    grid-area: subtitle;
    margin: 0;
    max-width: 100%;
    font-size: 12.5px;
    line-height: 1.45;
    letter-spacing: -0.02em;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  /* 공통 모바일 header-search 숨김을 덮어 메뉴명·작성자 검색창 표시 */
  #view-meal-recipe .meal-recipe-search.header-search {
    grid-area: search;
    display: block !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    order: unset;
  }

  #view-meal-recipe .meal-recipe-search .search-input-wrapper {
    width: 100%;
  }

  #view-meal-recipe .meal-recipe-search .search-input-wrapper input {
    font-size: 13px;
  }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .meal-recipe-meta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meal-recipe-meta-menu-name {
    grid-column: 1 / -1;
  }
}

/* 모바일/PWA 게시글 상세: 가로 overflow 원인 제거 + 카드 폭 확대 (PC 레이아웃 유지) */
@media (max-width: 768px) {
  .main-container:has(#view-post-detail.active) {
    padding-left: 10px;
    padding-right: 10px;
  }

  #view-post-detail,
  #view-post-detail .post-detail-card,
  #view-post-detail .detail-latest-posts {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #view-post-detail .post-detail-card {
    padding: 16px 3px 12px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #view-post-detail .detail-title-row {
    padding-left: 3px;
    padding-right: 3px;
    box-sizing: border-box;
  }

  #view-post-detail .detail-title-row .view-title {
    font-size: 19px;
  }

  #view-post-detail .detail-header,
  #view-post-detail .detail-school-link-panel,
  #view-post-detail .detail-content,
  #view-post-detail .detail-meal-recipe,
  #view-post-detail .detail-stats {
    padding-left: 6px;
    padding-right: 3px;
    box-sizing: border-box;
  }

  #view-post-detail .detail-latest-posts {
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  #view-post-detail .detail-content,
  #view-post-detail .detail-content a,
  #view-post-detail .detail-comment-text,
  #view-post-detail .detail-school-link-lines,
  #view-post-detail .detail-comment-form,
  #view-post-detail .detail-comments-section {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #view-post-detail .detail-header {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 8px;
    min-width: 0;
  }

  #view-post-detail .detail-header-main {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    gap: 4px;
  }

  #view-post-detail .detail-header-meta-row {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
  }

  #view-post-detail .detail-channel-tag {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
  }

  #view-post-detail .detail-meal-feed-badges {
    width: 100%;
    align-self: flex-start;
  }

  #view-post-detail .detail-header-right {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
    gap: 4px;
  }

  #view-post-detail .detail-owner-actions {
    display: none !important;
  }

  #view-post-detail .detail-meta {
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  #view-post-detail .detail-meta #detail-author {
    white-space: nowrap;
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
  }

  #view-post-detail .detail-meta #detail-date {
    white-space: nowrap;
    flex-shrink: 0;
    word-break: keep-all;
  }

  #view-post-detail .detail-meta #detail-date:not(:empty)::before {
    margin: 0 6px;
  }

  #view-post-detail .detail-more-menu-wrapper {
    margin-left: 0;
    flex-shrink: 0;
  }

  #view-post-detail .detail-more-menu {
    min-width: 0;
    width: max-content;
    max-width: 220px;
  }

  #view-post-detail .detail-stats {
    gap: 8px;
  }

  #view-post-detail .detail-share-btn {
    display: none !important;
    margin-right: 0;
  }

  #view-post-detail .detail-favorite-btn {
    margin-left: auto;
  }

  #view-post-detail .detail-comments-section,
  #view-post-detail .detail-comments-list,
  #view-post-detail .detail-comment-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  #view-post-detail .detail-comment-item {
    padding: 10px 10px;
  }

  #view-post-detail .detail-comment-actions {
    gap: 5px;
  }

  #view-post-detail .detail-comment-action-btn {
    padding: 4px 6px;
  }

  #view-post-detail .detail-comment-compose {
    position: relative;
    display: block;
    width: 100%;
  }

  #view-post-detail .detail-comment-input-wrap {
    position: relative;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px 40px;
    box-sizing: border-box;
  }

  #view-post-detail .detail-comment-input {
    border: none;
    padding: 0;
    min-height: 48px;
    border-radius: 0;
  }

  #view-post-detail .detail-comment-compose-bar {
    position: absolute;
    left: 10px;
    bottom: 6px;
    margin: 0;
  }

  #view-post-detail .detail-comment-submit {
    position: absolute;
    right: 8px;
    bottom: 6px;
    height: 32px;
    padding: 0 12px;
  }

  #view-post-detail .detail-latest-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
    box-sizing: border-box;
  }

  #view-post-detail .detail-latest-table .board-col-author,
  #view-post-detail .detail-latest-table .board-col-date,
  #view-post-detail .detail-latest-table .board-col-stats,
  #view-post-detail .detail-latest-table tbody td.board-post-meta,
  #view-post-detail .detail-latest-table tbody td.board-post-stats {
    display: none;
  }

  #view-post-detail .detail-latest-table .board-col-title,
  #view-post-detail .detail-latest-table tbody td.board-post-cell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #view-post-detail .detail-latest-table .board-post-preview,
  #view-post-detail .detail-latest-table .board-post-preview-text,
  #view-post-detail .detail-latest-table .board-post-title,
  #view-post-detail .detail-latest-table .board-post-excerpt {
    min-width: 0;
    max-width: 100%;
  }

  #view-post-detail .detail-latest-table .board-post-title,
  #view-post-detail .detail-latest-table .board-post-excerpt,
  #view-post-detail .detail-latest-table .board-post-preview.has-thumb .board-post-excerpt {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
  }

  #view-post-detail img,
  #view-post-detail video,
  #view-post-detail iframe,
  #view-post-detail table,
  #view-post-detail pre {
    max-width: 100%;
  }
}

/* ==========================================================================
   VIEW: CHAT (phase 1)
   ========================================================================== */
.chat-board-header {
  align-items: flex-start;
}

.chat-category-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.chat-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.chat-list-count {
  font-size: 13px;
  color: var(--text-muted);
}

.chat-sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

.chat-sort-label select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: var(--text-main);
}

.chat-room-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-room-card,
.chat-room-card-official {
  display: none;
}

.chat-room-card-avatar,
.chat-room-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--chat-primary-soft, #e8f6ec);
  color: var(--chat-primary, #4caf62);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  overflow: hidden;
}

.chat-room-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-room-card-title strong {
  font-size: 16px;
  color: var(--text-main);
}

.chat-official-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #b8bdc2;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-lock {
  font-size: 13px;
}

.chat-room-card-desc,
.chat-room-card-preview {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.chat-room-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-enter-btn {
  white-space: nowrap;
}

.chat-empty,
.chat-loading,
.chat-error {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  color: var(--text-sub);
}

.chat-empty p {
  white-space: pre-line;
  margin-bottom: 14px;
}

.chat-side-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-side-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
}

.chat-side-meta,
.chat-side-empty {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-side-more {
  margin-top: 10px;
  width: 100%;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 13px;
}

.chat-guide-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.chat-fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  z-index: 40;
  cursor: pointer;
}

.chat-room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-room-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.chat-room-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-more-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.chat-room-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
}

.chat-phase-note,
.chat-room-placeholder {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

.chat-member-group {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.chat-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 6px;
}

.chat-online-dot,
.chat-offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.chat-online-dot {
  background: var(--secondary-color);
}

.chat-create-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-cat-pick {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}

.chat-cat-pick.active {
  border-color: var(--chat-primary, #4caf62);
  color: var(--chat-primary, #4caf62);
  font-weight: 700;
}

.chat-radio {
  display: block;
  margin: 6px 0;
  font-size: 14px;
  color: var(--text-sub);
}

.chat-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.chat-cancel-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

body.chat-room-open .chat-fab {
  display: none !important;
}

@media (max-width: 1024px) {
  .chat-layout,
  .chat-room-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #view-chat .chat-header-search {
    order: 3;
    width: 100%;
  }

  #view-chat .write-btn#chat-create-btn {
    display: none;
  }

  .chat-layout-side {
    display: none;
  }

  body.chat-room-open .chat-layout-side,
  #view-chat.tab-view.active .chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.chat-room-open .chat-fab {
    display: none !important;
  }

  .chat-room-card,
  .chat-room-card-official {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .chat-enter-btn {
    display: none;
  }

  body.chat-room-open header,
  body.chat-room-open .mobile-bottom-nav {
    display: none;
  }

  .chat-room-panel {
    min-height: calc(100dvh - 24px);
  }

  .chat-room-header .board-back-btn span,
  .chat-room-header .view-subtitle {
    display: none;
  }

  body.chat-room-open .chat-room-members {
    display: none;
  }

  body.chat-room-open .chat-message-list {
    max-height: none;
    flex: 1;
  }

  body.chat-room-open .chat-room-messages {
    min-height: 0;
    flex: 1;
  }
}

.chat-room-messages {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.chat-conn-status,
#view-chat .chat-conn-status {
  display: none;
  font-size: 12px;
  color: #8a9099;
  margin: 8px 28px 0;
}

#view-chat .chat-conn-status[data-kind='warn'],
#view-chat .chat-conn-status[data-kind='error'] {
  display: block;
}

.chat-message-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  max-height: min(58vh, 560px);
}

.chat-msg-system {
  align-self: center;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.chat-msg-other,
.chat-msg-mine {
  display: flex;
  flex-direction: column;
  max-width: 64%;
  width: fit-content;
}

.chat-msg-other {
  align-self: flex-start;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.chat-msg-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.chat-msg-nick {
  font-size: 12px;
  color: #98a0a8;
  margin-bottom: 4px;
  line-height: 1.3;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dee2e6;
  color: #868e96;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.chat-msg-avatar .member-profile-avatar-icon,
.chat-member-avatar .member-profile-avatar-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.chat-msg-bubble {
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg-other .chat-msg-bubble {
  background: #f1f3f5;
  color: var(--text-main);
}

.chat-msg-mine .chat-msg-bubble {
  background: #4caf62;
  color: #fff;
}

.chat-msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-composer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
}

.chat-composer input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.chat-online-count {
  font-size: 12px;
  color: var(--secondary-color);
  font-weight: 700;
  margin: 0 0 8px;
}

/* ==========================================================================
   VIEW: CHAT (admin preview UI)
   ========================================================================== */
#view-chat {
  --chat-primary: #4caf62;
  --chat-primary-hover: #3d9b52;
  --chat-primary-soft: #e8f6ec;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-kor);
}

.main-content:has(#view-chat.active) .main-container {
  max-width: 1280px;
}

#view-chat .chat-coming-soon {
  min-height: 280px;
}

.chat-shell,
#view-chat .chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

body.chat-room-open #view-chat .chat-shell {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin: 0 auto;
}

body.chat-room-open #view-chat .chat-rail-right {
  display: none;
}

#view-chat .chat-rail,
#view-chat .chat-center {
  min-width: 0;
}

#view-chat .chat-center {
  width: 100%;
}

#view-chat .chat-page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

#view-chat .chat-page-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

#view-chat .chat-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  #view-chat .chat-center-head {
    align-items: center;
    gap: 20px;
  }
}

#view-chat .chat-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 420px;
  justify-content: flex-end;
}

#view-chat .chat-icon-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

#view-chat .chat-icon-btn:hover {
  color: var(--chat-primary);
  border-color: #cfe8d4;
  background: var(--chat-primary-soft);
}

#view-chat .chat-create-text-btn {
  border: 1px solid #cfe8d4;
  background: #fff;
  color: var(--chat-primary);
  border-radius: 10px;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

#view-chat .chat-create-text-btn:hover {
  background: var(--chat-primary-soft);
}

#view-chat .chat-sort-menu {
  position: relative;
}

#view-chat .chat-sort-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
  padding: 6px;
}

#view-chat .chat-sort-option {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-main);
}

#view-chat .chat-sort-option:hover,
#view-chat .chat-sort-option.active {
  background: var(--chat-primary-soft);
  color: var(--chat-primary);
  font-weight: 700;
}

#view-chat .chat-official-hero,
#view-chat .chat-phone,
#view-chat .chat-list-toolbar,
#view-chat .chat-rail-left,
#view-chat .chat-layout-side,
#view-chat .chat-online-card,
#view-chat [aria-label="내 채팅 탐색"] {
  display: none !important;
}

#view-chat .chat-primary-btn {
  background: var(--chat-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#view-chat .chat-primary-btn:hover {
  background: var(--chat-primary-hover);
}

#view-chat .chat-text-link {
  border: none;
  background: none;
  color: var(--chat-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#view-chat .chat-category-tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
  margin: 4px 0 0;
}

#view-chat .chat-cat-tab {
  border: none;
  background: none;
  padding: 10px 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
  cursor: pointer;
}

#view-chat .chat-cat-tab.active {
  color: var(--chat-primary);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--chat-primary);
}

#view-chat .chat-official-hero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

#view-chat .chat-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

#view-chat .chat-list-toolbar .chat-search-wrap {
  flex: 1 1 220px;
  min-width: 180px;
}

#view-chat .chat-sort-label {
  flex: 0 0 auto;
}

.chat-search-wrap,
#view-chat .chat-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 10px;
  min-width: 180px;
  max-width: 260px;
  height: 38px;
  flex: 1 1 200px;
}

#view-chat .chat-search-wrap input {
  border: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
}

#view-chat .chat-search-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

#view-chat .chat-sort-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
}

#view-chat .chat-sort-label select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
}

#view-chat .chat-list-count {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

#view-chat .chat-room-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
}

.chat-room-row,
#view-chat .chat-room-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(128px, 200px);
  gap: 14px;
  align-items: center;
  background: #fff;
  border: none;
  border-bottom: 1px solid #efefef;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 16px;
  cursor: pointer;
  min-height: 86px;
  max-height: 95px;
  transition: background 0.15s ease;
}

#view-chat .chat-room-row:last-child {
  border-bottom: none;
}

#view-chat .chat-room-row:hover {
  background: #f4faf6;
}

#view-chat .chat-room-title-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

#view-chat .chat-room-time {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

#view-chat .chat-room-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--chat-primary-soft);
  color: var(--chat-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
}

#view-chat .chat-room-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#view-chat .chat-room-list .chat-room-avatar {
  background: #e8eaed;
}

#view-chat .chat-room-list .chat-room-avatar img {
  filter: grayscale(1) brightness(1.22) contrast(0.82);
}

#view-chat .chat-room-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}

#view-chat .chat-room-tags {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-chat .chat-room-count {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-sub);
}

#view-chat .chat-room-tags:empty {
  display: none;
}

#view-chat .chat-room-members {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-sub);
}

#view-chat .chat-room-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-chat .chat-official-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #b8bdc2;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

#view-chat .chat-room-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  align-self: stretch;
  gap: 6px;
  min-width: 0;
  max-width: 220px;
  text-align: right;
}

#view-chat .chat-room-preview p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

#view-chat .chat-room-preview-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

#view-chat .chat-preview-author {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--chat-primary-soft);
  color: var(--chat-primary);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#view-chat .chat-room-preview p.is-empty {
  color: #b0b4ba;
}

#view-chat .chat-room-preview .chat-room-time,
#view-chat .chat-room-preview time {
  display: block;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

#view-chat .chat-rail-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 18px;
  margin-bottom: 16px;
}

#view-chat .chat-rail-card + .chat-rail-card {
  border-top: 1px solid #eee;
  padding-top: 16px;
}

#view-chat .chat-rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#view-chat .chat-rail-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

#view-chat .chat-side-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
  border-bottom: none;
  font-size: 13px;
}

#view-chat .chat-side-texts {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#view-chat .chat-side-texts strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-chat .chat-side-meta {
  font-size: 12px;
  color: var(--text-muted);
}

#view-chat .chat-created-more {
  display: block;
  margin: 6px 0 8px;
  padding: 0;
}

#view-chat .chat-side-list {
  max-height: 248px;
  overflow-y: auto;
}

#view-chat .chat-mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chat-primary-soft);
  color: var(--chat-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

#view-chat .chat-online-card .chat-online-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin: 0 0 4px;
}

#view-chat .chat-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16c45a;
  display: inline-block;
}

#view-chat .chat-offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

#view-chat .chat-guide-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border: none;
  background: none;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 14px;
}

.chat-phone,
#view-chat .chat-phone {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 12px 10px 14px;
  color: var(--text-main);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
}

#view-chat .chat-phone-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-main);
}

#view-chat .chat-mini-search-btn {
  color: var(--chat-primary);
  border: none;
  background: transparent;
}

#view-chat .chat-mini-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}

#view-chat .chat-mini-cat {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

#view-chat .chat-mini-cat.active {
  background: var(--chat-primary);
  border-color: var(--chat-primary);
  color: #fff;
}

#view-chat .chat-mini-rooms {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

#view-chat .chat-mini-room {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  background: #f7fbf8;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

#view-chat .chat-mini-messages {
  flex: 1;
  min-height: 140px;
  max-height: 180px;
  overflow-y: auto;
  background: #f6f7f8;
  color: var(--text-main);
  border-radius: 12px;
  padding: 8px;
}

#view-chat .chat-mini-composer {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

#view-chat .chat-mini-composer textarea {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 8px;
  resize: none;
  font-size: 13px;
}

.chat-thread,
#view-chat .chat-thread {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  min-height: 520px;
  height: calc(100vh - 210px);
  max-height: 820px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

#view-chat .chat-room-header-cover {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--chat-primary-soft);
}

#view-chat .chat-room-header-cover img,
#view-chat .chat-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#view-chat .chat-mini-avatar {
  overflow: hidden;
}

.chat-cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.chat-cover-pick {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.chat-cover-pick.selected {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 2px rgba(76, 175, 98, 0.25);
}

.chat-cover-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-cover-upload {
  display: inline-flex;
  margin-top: 10px;
  font-size: 13px;
  color: var(--chat-primary);
  font-weight: 700;
  cursor: pointer;
}

.chat-cover-upload input {
  display: none;
}

.chat-manage-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 60vh;
  overflow: auto;
}

.chat-manage-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.chat-manage-row strong {
  display: block;
  font-size: 15px;
}

.chat-manage-row p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .chat-cover-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .chat-cover-pick {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

#view-chat .chat-room-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 24px 14px;
  margin: 0;
}

#view-chat .chat-back-btn,
#view-chat .chat-room-header-cover,
#view-chat .chat-room-header-actions {
  flex-shrink: 0;
}

#view-chat .chat-room-header-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

#view-chat .chat-thread-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

#view-chat .chat-thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  width: 100%;
}

#view-chat .chat-thread-desc {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #98a0a8;
  line-height: 1.4;
}

#view-chat .chat-thread-sub {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: #98a0a8;
}

@media (min-width: 768px) {
  #view-chat .chat-thread-desc:not([hidden]):not(:empty)::after {
    content: '·';
    margin-left: 8px;
    color: #c5c9cd;
  }
}

#view-chat .chat-more-menu-wrapper {
  position: relative;
  flex-shrink: 0;
}

#view-chat .chat-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 80;
}

#view-chat .chat-more-menu-wrapper.active .chat-more-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#view-chat .chat-popout-btn,
#view-chat .chat-more-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
}

#view-chat .chat-popout-btn:hover,
#view-chat .chat-more-btn:hover {
  color: var(--chat-primary);
  border-color: #cfe8d4;
}

#view-chat .chat-popout-btn svg {
  width: 18px;
  height: 18px;
}

.chat-mini-window {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 340px;
  z-index: 1400;
}

.chat-mini-window[hidden] {
  display: none !important;
}

.chat-mini-window .chat-float-head {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.chat-mini-window .chat-float {
  height: 500px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18);
  overflow: hidden;
}

.chat-mini-window .chat-float-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid var(--border-color);
  background: #f7fbf8;
}

.chat-mini-window .chat-float-cover {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--chat-primary-soft);
}

.chat-mini-window .chat-float-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-mini-window .chat-float-titles {
  min-width: 0;
  flex: 1;
}

.chat-mini-window .chat-float-titles strong {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-mini-window .chat-float-titles span {
  font-size: 12px;
  color: var(--chat-primary);
}

.chat-mini-window .chat-float-icon {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-mini-window .chat-float-icon:hover {
  background: var(--chat-primary-soft);
  color: var(--chat-primary);
}

.chat-mini-window .chat-float-icon svg {
  width: 16px;
  height: 16px;
}

.chat-mini-window .chat-float-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f6f7f8;
}

.chat-mini-window .chat-msg {
  max-width: 82%;
}

.chat-mini-window .chat-msg-other {
  flex-direction: row;
  align-items: flex-start;
}

#chat-mini-dock .chat-msg-other,
#chat-mini-dock .chat-msg-mine {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

#chat-mini-dock .chat-msg-mine {
  flex-direction: row-reverse;
}

#chat-mini-dock .chat-msg-mine .chat-msg-stack {
  align-items: flex-end;
}

#chat-mini-dock .chat-msg-mine .chat-msg-meta {
  flex-direction: row-reverse;
}

#chat-mini-dock .chat-msg-nick,
#chat-mini-dock .chat-msg-time {
  margin: 0;
}

#chat-mini-dock .chat-msg-avatar {
  flex-shrink: 0;
}

.chat-mini-window .chat-float-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 8px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
}

.chat-mini-window .chat-float-composer textarea {
  flex: 1;
  border: none;
  resize: none;
  font-size: 14px;
  min-height: 22px;
  max-height: 72px;
}

.chat-mini-window .chat-float-composer textarea:focus {
  outline: none;
}

.chat-mini-window .chat-primary-btn {
  background: var(--chat-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chat-mini-notice {
  position: fixed;
  left: 50%;
  top: 88px;
  transform: translateX(-50%);
  z-index: 1600;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #cfe8d4;
  background: #fff;
  color: #2e7d3e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
  text-align: center;
}

.chat-mini-notice[hidden] {
  display: none !important;
}

@media (max-width: 1023px) {
  .chat-mini-window {
    width: 320px;
  }
}

@media (max-width: 767px) {
  #view-chat .chat-popout-btn,
  .chat-mini-window,
  #chat-mini-notice {
    display: none !important;
  }
}

#view-chat .chat-thread-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-chat .chat-thread-tabs {
  display: flex;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-color);
}

#view-chat .chat-thread-tab {
  border: none;
  background: none;
  padding: 12px 0 10px;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 15px;
}

#view-chat .chat-thread-tab.active {
  color: var(--chat-primary);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--chat-primary);
}

#view-chat .chat-message-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#view-chat .chat-message-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 16px 12px 12px;
}

#view-chat .chat-message-list .chat-msg {
  max-width: 64%;
  width: fit-content;
}

#view-chat .chat-msg-system {
  align-self: center;
  max-width: none;
  width: fit-content;
  background: transparent;
  padding: 4px 0;
  color: inherit;
}

#view-chat .chat-msg-system p {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: #8a9099;
  background: #f3f4f6;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  line-height: 1.4;
}

#view-chat .chat-msg-other .chat-msg-bubble {
  background: #fff;
  color: var(--text-main);
  border: 1px solid #eceef0;
  border-radius: 16px 16px 16px 6px;
}

#view-chat .chat-msg-mine .chat-msg-bubble {
  background: #4caf62;
  color: #fff;
  border-radius: 16px 16px 6px 16px;
}

#view-chat .chat-msg-time {
  font-size: 11px;
  color: #b0b5ba;
  margin-top: 4px;
}

#view-chat .chat-msg-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: #dee2e6;
  color: #868e96;
}

.chat-composer,
#view-chat .chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 740px;
  margin: 8px auto 20px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
}

#view-chat .chat-composer:focus-within {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px var(--chat-primary-soft);
}

#view-chat .chat-composer-plus {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--chat-primary);
  font-size: 20px;
  flex-shrink: 0;
}

.chat-composer textarea,
#view-chat .chat-composer textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 8px 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-shadow: none;
}

.chat-composer textarea:focus,
#view-chat .chat-composer textarea:focus {
  border: none;
  box-shadow: none;
}

#view-chat .chat-composer .chat-primary-btn {
  border-radius: 999px;
  padding: 8px 16px;
}

#view-chat .chat-room-members {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

#view-chat .chat-fab {
  background: var(--chat-primary);
}

#chat-create-modal,
#chat-edit-modal,
#chat-manage-modal {
  --chat-primary: #4caf62;
  --chat-primary-hover: #3d9b52;
  --chat-primary-soft: #e8f6ec;
  accent-color: var(--chat-primary);
}

#chat-create-modal .chat-cat-pick.active,
#chat-edit-modal .chat-cat-pick.active {
  border-color: var(--chat-primary);
  color: var(--chat-primary);
}

#chat-create-modal .chat-cover-pick.selected,
#chat-edit-modal .chat-cover-pick.selected {
  border-color: var(--chat-primary);
}

#chat-create-modal .chat-primary-btn,
#chat-edit-modal .chat-primary-btn,
#chat-manage-modal .chat-primary-btn {
  background: var(--chat-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#chat-create-modal .chat-primary-btn:hover,
#chat-edit-modal .chat-primary-btn:hover,
#chat-manage-modal .chat-primary-btn:hover {
  background: var(--chat-primary-hover);
}

#chat-create-modal input:focus,
#chat-create-modal textarea:focus,
#chat-create-modal select:focus,
#chat-edit-modal input:focus,
#chat-edit-modal textarea:focus,
#chat-edit-modal select:focus {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px var(--chat-primary-soft);
  outline: none;
}

#view-chat .chat-empty,
#view-chat .chat-loading,
#view-chat .chat-error {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
}

@media (max-width: 1199px) {
  #view-chat .chat-shell {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 26%);
  }
  body.chat-room-open #view-chat .chat-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  #view-chat .chat-rail-right,
  #view-chat .chat-sort-menu,
  #view-chat #chat-notify-btn,
  #view-chat #chat-create-btn {
    display: none;
  }
  #view-chat .chat-shell {
    grid-template-columns: 1fr;
  }
  #view-chat.tab-view.active .chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.chat-room-open .chat-fab {
    display: none !important;
  }
  body.chat-room-open header,
  body.chat-room-open .mobile-header,
  body.chat-room-open .mobile-bottom-nav,
  body.chat-room-open .footer {
    display: none !important;
  }
  body.chat-room-open {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
  }
  body.chat-room-open .main-content,
  body.chat-room-open .main-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100%;
  }
  body.chat-room-open #view-chat.tab-view.active {
    position: fixed;
    inset: 0;
    z-index: 1200;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #fff;
  }
  body.chat-room-open #view-chat #chat-app,
  body.chat-room-open #view-chat .chat-shell,
  body.chat-room-open #view-chat .chat-center,
  body.chat-room-open #view-chat .chat-room-panel,
  body.chat-room-open #view-chat .chat-thread {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: none;
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  body.chat-room-open #view-chat .chat-thread {
    height: 100% !important;
    min-height: 0 !important;
  }
  body.chat-room-open #view-chat .chat-room-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }
  body.chat-room-open #view-chat .chat-message-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    max-width: none;
    padding: 12px 16px;
  }
  body.chat-room-open #view-chat .chat-composer {
    position: relative;
    flex-shrink: 0;
    width: auto;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    align-items: center;
    min-width: 0;
    margin: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
  }
  body.chat-room-open #view-chat .chat-composer textarea {
    flex: 1 1 auto;
    min-width: 0;
  }
  body.chat-room-open #view-chat .chat-composer .chat-primary-btn {
    flex: 0 0 auto;
  }
  #view-chat .chat-thread {
    min-height: calc(100dvh - 12px);
    height: calc(100dvh - 12px);
    border-radius: 0;
  }
  #view-chat .chat-message-list {
    max-width: none;
    padding: 12px 16px;
  }
  #view-chat .chat-composer {
    width: auto;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    align-items: center;
    min-width: 0;
    margin: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
  }
  #view-chat .chat-composer textarea {
    flex: 1 1 auto;
    min-width: 0;
  }
  #view-chat .chat-composer .chat-primary-btn {
    flex: 0 0 auto;
  }
  #view-chat .chat-message-list .chat-msg {
    max-width: 78%;
  }
  #view-chat .chat-room-header {
    padding: 10px 16px 6px;
    align-items: center;
  }
  #view-chat .chat-room-header-cover {
    width: 34px;
    height: 34px;
  }
  #view-chat .chat-thread-title {
    font-size: 16px;
    font-weight: 600;
  }
  #view-chat .chat-thread-meta,
  #view-chat .chat-thread-desc,
  #view-chat .chat-thread-sub,
  #view-chat #chat-room-official-badge {
    display: none !important;
  }
  #view-chat .chat-thread-tabs {
    padding: 4px 16px 0;
    margin-top: 2px;
  }
  #view-chat .chat-conn-status {
    margin: 8px 16px 0;
  }
  #view-chat .chat-more-btn,
  #view-chat .chat-back-btn {
    flex-shrink: 0;
  }
  #view-chat .chat-room-avatar {
    width: 48px;
    height: 48px;
  }
  #view-chat .chat-room-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    max-height: none;
  }
  #view-chat .chat-room-preview p {
    display: none;
  }
  #view-chat .chat-room-preview {
    max-width: 72px;
    min-width: 0;
    justify-content: flex-start;
  }
  #view-chat .chat-category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #view-chat .chat-category-tabs::-webkit-scrollbar {
    display: none;
  }
  #view-chat,
  #view-chat .chat-shell {
    overflow-x: hidden;
  }
  #view-chat .chat-center-head {
    flex-wrap: wrap;
  }
  #view-chat .chat-head-tools {
    flex: 1 1 100%;
    justify-content: stretch;
  }
  #view-chat .chat-search-wrap {
    max-width: none;
  }
  #view-chat .chat-list-toolbar {
    display: none;
  }
}

/* ==========================================================================
   VIEW: CHAT channel layout (Slack-like, Nutie brand)
   ========================================================================== */
body:has(#view-chat.active.chat-channel-ui) .footer {
  display: none;
}

.main-content:has(#view-chat.active.chat-channel-ui) {
  padding-top: 0;
  padding-bottom: 0;
  min-height: calc(100dvh - 60px);
}

.main-content:has(#view-chat.active.chat-channel-ui) .main-container {
  max-width: none;
  padding: 0;
  height: calc(100dvh - 60px);
  min-height: 0;
}

#view-chat.chat-channel-ui.active {
  display: flex;
  flex-direction: column;
  animation: none;
}

#view-chat.chat-channel-ui {
  /* 채널 UI 전용 토큰. 사이트 전역 색은 건드리지 않는다. */
  --chat-app-offset: 60px;
  --chat-nav-width: 276px;
  --chat-info-width: 312px;
  --chat-nav-bg: #2f7d57;
  --chat-nav-line: rgba(255, 255, 255, 0.16);
  --chat-nav-text: rgba(255, 255, 255, 0.94);
  --chat-nav-dim: rgba(255, 255, 255, 0.66);
  --chat-nav-group: rgba(255, 255, 255, 0.86);
  --chat-nav-hover: rgba(255, 255, 255, 0.14);
  --chat-nav-active: #48a674;
  --chat-line: #e6ebe7;
  height: 100%;
  min-height: 0;
}

#view-chat.chat-channel-ui #chat-app {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0;
}

#view-chat.chat-channel-ui .chat-shell {
  display: grid;
  grid-template-columns: var(--chat-nav-width) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  background: #fff;
  border: none;
  border-top: 1px solid var(--chat-line);
  border-radius: 0;
  overflow: hidden;
}

#view-chat.chat-channel-ui.chat-info-open .chat-shell {
  grid-template-columns: var(--chat-nav-width) minmax(0, 1fr) var(--chat-info-width);
}

@media (min-width: 768px) {
  body.chat-room-open #view-chat.chat-channel-ui .chat-shell {
    grid-template-columns: var(--chat-nav-width) minmax(0, 1fr);
    max-width: none;
  }
  body.chat-room-open #view-chat.chat-channel-ui.chat-info-open .chat-shell {
    grid-template-columns: var(--chat-nav-width) minmax(0, 1fr) var(--chat-info-width);
  }
  #view-chat.chat-channel-ui .chat-back-btn {
    display: none;
  }
}

body.chat-room-open #view-chat.chat-channel-ui .chat-shell,
body.chat-room-open #view-chat.chat-channel-ui.chat-info-open .chat-shell {
  max-width: none;
  margin: 0;
}

#view-chat.chat-channel-ui .chat-channel-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--chat-nav-bg);
  border-right: none;
  padding: 0;
  color: var(--chat-nav-text);
}

#view-chat.chat-channel-ui .chat-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin: 0;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--chat-nav-line);
}

#view-chat.chat-channel-ui .chat-page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

#view-chat.chat-channel-ui .chat-page-sub {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--chat-nav-dim);
}

#view-chat.chat-channel-ui .chat-sidebar-tools {
  flex-shrink: 0;
}

#view-chat.chat-channel-ui .chat-sidebar-tools .chat-icon-btn {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #d6ebdd;
}

#view-chat.chat-channel-ui .chat-sidebar-tools .chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-search-wrap {
  max-width: none;
  min-width: 0;
  width: auto;
  height: 34px;
  flex: 0 0 auto;
  margin: 12px 12px 8px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-search-wrap input {
  background: transparent;
  border: none;
  color: #eaf5ee;
  font-size: 13px;
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-search-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-search-wrap svg {
  color: rgba(255, 255, 255, 0.55);
}

#view-chat.chat-channel-ui .chat-sidebar-switch {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  margin: 0 12px 6px;
  padding: 3px;
  border-bottom: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

#view-chat.chat-channel-ui .chat-sidebar-switch-btn {
  flex: 1;
  border: none;
  background: none;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--chat-nav-dim);
  cursor: pointer;
}

#view-chat.chat-channel-ui .chat-sidebar-switch-btn:hover {
  color: #eaf5ee;
}

#view-chat.chat-channel-ui .chat-sidebar-switch-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
}

#view-chat.chat-channel-ui .chat-channel-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

#view-chat.chat-channel-ui .chat-channel-nav::-webkit-scrollbar {
  width: 8px;
}

#view-chat.chat-channel-ui .chat-channel-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

#view-chat.chat-channel-ui .chat-channel-nav .chat-loading,
#view-chat.chat-channel-ui .chat-channel-nav .chat-error,
#view-chat.chat-channel-ui .chat-channel-nav .chat-side-empty {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 14px 8px;
  text-align: left;
  font-size: 13px;
  color: var(--chat-nav-dim);
}

#view-chat.chat-channel-ui .chat-channel-group {
  margin: 14px 0 4px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--chat-nav-group);
  text-transform: none;
}

#view-chat.chat-channel-ui .chat-channel-group-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--chat-nav-group);
}

#view-chat.chat-channel-ui .chat-channel-group-toggle:hover {
  background: var(--chat-nav-hover);
  color: #eaf5ee;
}

#view-chat.chat-channel-ui .chat-channel-caret {
  width: 12px;
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1;
}

#view-chat.chat-channel-ui .chat-channel-group.is-mine {
  color: #f3fff7;
}

#view-chat.chat-channel-ui .chat-channel-group.is-flash {
  animation: chat-nav-flash 1.1s ease-out 1;
  border-radius: 6px;
}

@keyframes chat-nav-flash {
  0% { background: rgba(126, 214, 162, 0.32); }
  100% { background: transparent; }
}

#view-chat.chat-channel-ui .chat-channel-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#view-chat.chat-channel-ui .chat-channel-manage-btn {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--chat-nav-dim);
  cursor: pointer;
}

#view-chat.chat-channel-ui .chat-channel-manage-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

#view-chat.chat-channel-ui .chat-channel-sub {
  margin: 9px 0 2px;
  padding: 0 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

#view-chat.chat-channel-ui .chat-channel-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 5px 8px;
  text-align: left;
  cursor: pointer;
  color: var(--chat-nav-text);
  font-size: 14px;
  line-height: 1.45;
}

#view-chat.chat-channel-ui .chat-channel-item:hover {
  background: var(--chat-nav-hover);
  color: #fff;
}

#view-chat.chat-channel-ui .chat-channel-item.active {
  background: var(--chat-nav-active);
  color: #fff;
  font-weight: 700;
}

#view-chat.chat-channel-ui .chat-channel-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #a8efc4;
}

#view-chat.chat-channel-ui .chat-channel-hash {
  flex-shrink: 0;
  width: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

#view-chat.chat-channel-ui .chat-channel-item:hover .chat-channel-hash,
#view-chat.chat-channel-ui .chat-channel-item.active .chat-channel-hash {
  color: rgba(255, 255, 255, 0.9);
}

#view-chat.chat-channel-ui .chat-channel-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-chat.chat-channel-ui .chat-sidebar-foot {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--chat-nav-line);
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-create-text-btn {
  display: flex;
  width: 100%;
  height: auto;
  justify-content: center;
  margin: 0;
  padding: 9px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #d6ebdd;
  font-size: 13px;
  font-weight: 700;
}

#view-chat.chat-channel-ui .chat-channel-sidebar .chat-create-text-btn:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

#view-chat.chat-channel-ui .chat-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  background: #fff;
}

#view-chat.chat-channel-ui .chat-main-panel,
#view-chat.chat-channel-ui .chat-room-panel,
#view-chat.chat-channel-ui .chat-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  max-width: none;
  margin: 0;
  border: none;
  border-radius: 0;
}

#view-chat.chat-channel-ui .chat-empty-channel {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(980px 420px at 50% -12%, #f2fbf5 0%, #ffffff 62%);
}

#view-chat.chat-channel-ui .chat-empty-channel .chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

#view-chat.chat-channel-ui .chat-welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--chat-primary-soft);
  color: #2f8a4b;
}

#view-chat.chat-channel-ui .chat-welcome-icon svg {
  width: 26px;
  height: 26px;
}

#view-chat.chat-channel-ui .chat-welcome-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

#view-chat.chat-channel-ui .chat-welcome-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

#view-chat.chat-channel-ui .chat-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

#view-chat.chat-channel-ui .chat-welcome-actions .chat-primary-btn {
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
}

#view-chat.chat-channel-ui .chat-ghost-btn {
  border: 1px solid #cfe0d5;
  background: #fff;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2f7a42;
  cursor: pointer;
}

#view-chat.chat-channel-ui .chat-ghost-btn:hover {
  background: var(--chat-primary-soft);
  border-color: var(--chat-primary);
}

#view-chat.chat-channel-ui .chat-welcome-suggest {
  width: 100%;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--chat-line);
}

#view-chat.chat-channel-ui .chat-welcome-suggest-label {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9aa2a8;
}

#view-chat.chat-channel-ui .chat-welcome-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

#view-chat.chat-channel-ui .chat-welcome-chip {
  border: 1px solid var(--chat-line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
}

#view-chat.chat-channel-ui .chat-welcome-chip:hover {
  border-color: var(--chat-primary);
  background: var(--chat-primary-soft);
  color: #2f7a42;
}

#view-chat.chat-channel-ui .chat-room-header {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--chat-line);
  background: #fff;
}

#view-chat.chat-channel-ui .chat-room-header-cover {
  display: none;
}

#view-chat.chat-channel-ui .chat-room-header-main {
  gap: 1px;
}

#view-chat.chat-channel-ui .chat-thread-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#view-chat.chat-channel-ui .chat-thread-title::before {
  content: none;
}

#view-chat.chat-channel-ui .chat-room-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#view-chat.chat-channel-ui .chat-room-header-actions .chat-icon-btn,
#view-chat.chat-channel-ui .chat-room-header-actions .chat-popout-btn,
#view-chat.chat-channel-ui .chat-room-header-actions .chat-more-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-sub);
}

#view-chat.chat-channel-ui .chat-room-header-actions .chat-icon-btn:hover,
#view-chat.chat-channel-ui .chat-room-header-actions .chat-popout-btn:hover,
#view-chat.chat-channel-ui .chat-room-header-actions .chat-more-btn:hover {
  background: #f3f6f4;
  color: var(--chat-primary);
  border-color: transparent;
}

#view-chat.chat-channel-ui .chat-popout-btn {
  display: inline-flex;
}

#view-chat.chat-channel-ui .chat-thread-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
}

#view-chat.chat-channel-ui .chat-thread-desc,
#view-chat.chat-channel-ui .chat-thread-sub {
  display: inline;
  font-size: 12.5px;
  color: var(--text-muted);
}

#view-chat.chat-channel-ui .chat-thread-desc:not([hidden]) + .chat-thread-sub:not(:empty)::before {
  content: '·';
  margin: 0 6px;
  color: #c5cbc7;
}

#view-chat.chat-channel-ui .chat-thread-sub {
  white-space: nowrap;
}

#view-chat.chat-channel-ui .chat-message-pane,
#view-chat.chat-channel-ui #chat-message-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#view-chat.chat-channel-ui .chat-message-list,
#view-chat.chat-channel-ui #chat-message-list {
  display: flex;
  flex-direction: column;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 10px 0 8px;
  gap: 0;
  overscroll-behavior: contain;
}

#view-chat.chat-channel-ui .chat-message-list .chat-msg,
#view-chat.chat-channel-ui #chat-message-list .chat-msg {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 6px 22px;
  border-radius: 0;
}

#view-chat.chat-channel-ui .chat-msg-other,
#view-chat.chat-channel-ui .chat-msg-mine {
  align-self: stretch;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  max-width: none;
}

#view-chat.chat-channel-ui .chat-msg-other:hover,
#view-chat.chat-channel-ui .chat-msg-mine:hover {
  background: #f7f9f8;
}

#view-chat.chat-channel-ui .chat-msg-mine {
  align-items: flex-start;
}

#view-chat.chat-channel-ui .chat-msg-stack {
  min-width: 0;
  flex: 1;
}

#view-chat.chat-channel-ui .chat-msg-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 1px;
}

#view-chat.chat-channel-ui .chat-msg-nick {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

#view-chat.chat-channel-ui .chat-msg-time {
  margin: 0;
  font-size: 11px;
  color: #9aa2a8;
}

#view-chat.chat-channel-ui .chat-message-list .chat-msg-other .chat-msg-bubble,
#view-chat.chat-channel-ui .chat-message-list .chat-msg-mine .chat-msg-bubble,
#view-chat.chat-channel-ui #chat-message-list .chat-msg-other .chat-msg-bubble,
#view-chat.chat-channel-ui #chat-message-list .chat-msg-mine .chat-msg-bubble {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--text-main);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

#view-chat.chat-channel-ui .chat-msg-avatar {
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

#view-chat.chat-channel-ui .chat-message-list .chat-msg-system {
  align-self: center;
  width: fit-content;
  max-width: calc(100% - 40px);
  padding: 6px 0;
  background: transparent;
}

#view-chat.chat-channel-ui .chat-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  gap: 0;
  width: auto;
  max-width: none;
  margin: 0 20px 16px;
  padding: 5px 6px calc(6px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
  border: 1px solid #d9ddda;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  position: static;
}

#view-chat.chat-channel-ui .chat-composer:focus-within {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px rgba(76, 175, 98, 0.15);
}

#view-chat.chat-channel-ui .chat-composer textarea {
  flex: none;
  width: 100%;
  min-height: 42px;
  max-height: 168px;
  padding: 8px 8px 4px;
  font-size: 14px;
  line-height: 1.55;
}

#view-chat.chat-channel-ui .chat-composer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}

#view-chat.chat-channel-ui .chat-composer-plus {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #838d94;
  font-size: 18px;
}

#view-chat.chat-channel-ui .chat-composer-hint {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: #a6adb2;
}

#view-chat.chat-channel-ui .chat-composer .chat-primary-btn {
  flex-shrink: 0;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 13px;
}

#view-chat.chat-channel-ui .chat-info-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  background: #fbfcfb;
  border-left: 1px solid var(--chat-line);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#view-chat.chat-channel-ui .chat-info-panel[hidden] {
  display: none !important;
}

#view-chat.chat-channel-ui .chat-info-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin: 0;
  padding: 11px 14px 11px 16px;
  border-bottom: 1px solid var(--chat-line);
  background: #fbfcfb;
}

#view-chat.chat-channel-ui .chat-info-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
}

#view-chat.chat-channel-ui .chat-info-desc {
  margin: 0;
  padding: 14px 16px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-sub);
}

#view-chat.chat-channel-ui .chat-info-count {
  margin: 0;
  padding: 8px 16px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

#view-chat.chat-channel-ui .chat-info-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--chat-line);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9aa2a8;
}

#view-chat.chat-channel-ui .chat-info-members-toggle {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--chat-primary);
  cursor: pointer;
}

#view-chat.chat-channel-ui .chat-room-members {
  flex: none;
  overflow: visible;
  padding: 0 8px 10px;
}

#view-chat.chat-channel-ui .chat-room-members h3 {
  display: none;
}

#view-chat.chat-channel-ui .chat-member-group {
  margin: 8px 0 2px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #a8b0b6;
}

#view-chat.chat-channel-ui .chat-member-row {
  gap: 8px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-sub);
}

#view-chat.chat-channel-ui .chat-member-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dee2e6;
  color: #868e96;
  font-size: 12px;
  font-weight: 700;
}

#view-chat.chat-channel-ui .chat-member-name {
  min-width: 0;
  flex: 1;
}

#view-chat.chat-channel-ui .chat-member-row .chat-online-dot,
#view-chat.chat-channel-ui .chat-member-row .chat-offline-dot {
  margin-left: auto;
}

#view-chat.chat-channel-ui .chat-member-row:hover {
  background: #f1f4f2;
}

#view-chat.chat-channel-ui .chat-info-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: auto 0 0;
  padding: 12px;
  border-top: 1px solid var(--chat-line);
  border-bottom: none;
}

#view-chat.chat-channel-ui .chat-info-action {
  border: 1px solid var(--chat-line);
  background: #fff;
  text-align: center;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-sub);
  border-radius: 8px;
}

#view-chat.chat-channel-ui .chat-info-action:hover {
  background: var(--chat-primary-soft);
  border-color: var(--chat-primary);
  color: #2f7a42;
}

#view-chat.chat-channel-ui .chat-info-leave {
  color: #c0392b;
}

#view-chat.chat-channel-ui .chat-info-leave:hover {
  background: #fff4f4;
  border-color: #f0b8b2;
  color: var(--primary-color);
}

#view-chat.chat-channel-ui .chat-info-backdrop {
  display: none;
}

#view-chat.chat-channel-ui .chat-fab {
  display: none;
}

@media (max-width: 1023px) {
  #view-chat.chat-channel-ui {
    --chat-nav-width: 248px;
  }

  #view-chat.chat-channel-ui .chat-shell,
  #view-chat.chat-channel-ui.chat-info-open .chat-shell,
  body.chat-room-open #view-chat.chat-channel-ui.chat-info-open .chat-shell {
    grid-template-columns: var(--chat-nav-width) minmax(0, 1fr);
  }

  #view-chat.chat-channel-ui .chat-info-panel {
    position: fixed;
    top: 76px;
    right: 16px;
    width: min(320px, calc(100vw - 32px));
    height: calc(100dvh - 100px);
    border: 1px solid var(--chat-line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
    z-index: 80;
  }

  #view-chat.chat-channel-ui.chat-info-open .chat-info-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.28);
    z-index: 70;
  }
}

@media (max-width: 767px) {
  .main-content:has(#view-chat.active.chat-channel-ui) {
    padding-top: 0;
    padding-bottom: 72px;
  }

  .main-content:has(#view-chat.active.chat-channel-ui) .main-container {
    height: auto;
    min-height: calc(100dvh - 132px);
    padding: 0;
  }

  #view-chat.chat-channel-ui .chat-shell,
  #view-chat.chat-channel-ui.chat-info-open .chat-shell {
    grid-template-columns: 1fr;
    min-height: calc(100dvh - 132px);
    border-radius: 0;
  }

  #view-chat.chat-channel-ui .chat-center,
  #view-chat.chat-channel-ui .chat-info-panel {
    display: none;
  }

  #view-chat.chat-channel-ui .chat-fab {
    display: flex;
  }

  body.chat-room-open #view-chat.chat-channel-ui .chat-channel-sidebar {
    display: none;
  }

  body.chat-room-open #view-chat.chat-channel-ui .chat-center {
    display: flex;
  }

  body.chat-room-open #view-chat.chat-channel-ui .chat-info-panel {
    display: none;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  body.chat-room-open #view-chat.chat-channel-ui.chat-info-open .chat-info-panel {
    display: flex;
    z-index: 1300;
  }

  body.chat-room-open #view-chat.chat-channel-ui.chat-info-open .chat-info-backdrop {
    z-index: 1250;
  }

  #view-chat.chat-channel-ui .chat-room-header-cover,
  #view-chat.chat-channel-ui .chat-popout-btn {
    display: none;
  }

  #view-chat.chat-channel-ui .chat-sidebar-foot {
    display: none;
  }

  #view-chat.chat-channel-ui .chat-message-list {
    padding: 10px 0 6px;
  }

  #view-chat.chat-channel-ui .chat-message-list .chat-msg {
    padding: 5px 14px;
  }

  #view-chat.chat-channel-ui .chat-composer {
    margin: 0 12px 12px;
  }

  #view-chat.chat-channel-ui .chat-composer-hint {
    display: none;
  }

  #view-chat.chat-channel-ui .chat-room-header {
    padding: 10px 12px;
  }
}

.share-badge {
  display: none !important;
}

.author-with-grade {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1px 2px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.nanum-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 1em;
  font-weight: 500;
  line-height: 1;
  height: 1em;
  color: inherit;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
}

.nanum-grade:hover,
.nanum-grade:focus-visible {
  color: inherit;
  background: transparent;
}

.nanum-grade:focus-visible {
  outline: 2px solid rgba(18, 184, 134, 0.45);
  outline-offset: 2px;
}

.detail-comment-meta .nanum-grade,
.meal-feed-card-author .nanum-grade,
.detail-review-item-author .nanum-grade,
.detail-meta .nanum-grade {
  margin-left: 0;
}

.nanum-grade-tooltip {
  position: fixed;
  z-index: 2400;
  max-width: min(280px, calc(100vw - 16px));
  padding: 6px 10px;
  border-radius: 8px;
  background: #212529;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  word-break: keep-all;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}

@media (max-width: 768px) {
  .nanum-grade-tooltip {
    white-space: normal;
    max-width: min(240px, calc(100vw - 16px));
  }
}

.my-nanum-section {
  margin-top: 22px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #f3fff9 0%, #ffffff 72%);
  border: 1px solid #d3f9d8;
}

.my-nanum-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.my-nanum-section h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.nanum-temp-info-btn {
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 999px;
}

.nanum-temp-info-btn:hover,
.nanum-temp-info-btn:focus-visible {
  background: #e6fcf5;
  color: var(--secondary-hover);
}

.my-nanum-temp {
  margin: 0 0 6px;
  font-family: var(--font-eng);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0ca678;
  line-height: 1.1;
}

.my-nanum-grade {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  border: 0;
  border-radius: 8px;
  padding: 3px 5px;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
}

.my-nanum-grade:hover,
.my-nanum-grade:focus-visible {
  background: #e6fcf5;
}

.my-nanum-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
}

.sharing-level-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #d3f9d8;
}

.sharing-level-setting > div {
  display: grid;
  gap: 3px;
}

.sharing-level-setting strong {
  font-size: 13px;
  color: var(--text-main);
}

.sharing-level-setting span {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

.sharing-level-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.sharing-level-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sharing-level-toggle > span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #ced4da;
  transition: background-color 0.18s ease;
}

.sharing-level-toggle > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.sharing-level-toggle input:checked + span {
  background: var(--secondary-color);
}

.sharing-level-toggle input:checked + span::after {
  transform: translateX(18px);
}

.sharing-level-toggle input:focus-visible + span {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.sharing-level-toggle input:disabled + span {
  cursor: wait;
  opacity: 0.6;
}

.sharing-level-info-modal {
  overflow-y: auto;
  padding: 16px 0;
}

.sharing-level-info-content {
  max-width: 430px;
  max-height: min(86vh, 760px);
  overflow-y: auto;
  box-sizing: border-box;
}

.sharing-level-info-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.sharing-level-sequence {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 4px;
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-sub);
  text-align: center;
  word-break: keep-all;
}

.sharing-level-sequence-item,
.sharing-level-sequence-arrow {
  white-space: nowrap;
}

.sharing-level-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-color);
}

.sharing-level-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border-color);
}

.sharing-level-list strong {
  font-size: 13.5px;
  color: var(--text-main);
}

.sharing-level-list span {
  max-width: 58%;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  word-break: keep-all;
}

.sharing-level-footnote {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  word-break: keep-all;
}

.sharing-level-self-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f3f5;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-sub);
}

.nanum-temp-guide-content {
  max-width: 440px;
}

.nanum-temp-chart {
  margin: 4px 0 16px;
  padding: 8px 6px 2px;
  border-radius: 14px;
  background: #f8f9fa;
  border: 1px solid var(--border-color);
}

.nanum-temp-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.nanum-temp-chart-axis {
  stroke: #dee2e6;
  stroke-width: 1;
}

.nanum-temp-chart-line {
  stroke: #12b886;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nanum-temp-chart-label {
  fill: var(--text-sub);
  font-size: 9px;
  font-weight: 600;
}

.nanum-temp-chart-ace-star {
  fill: #e03131;
}

.nanum-temp-chart-axis-title,
.nanum-temp-chart-tick {
  fill: var(--text-muted);
  font-size: 10px;
}

.nanum-temp-guide-note {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-sub);
}

.nanum-temp-guide-sub {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .sharing-level-info-modal {
    align-items: flex-end;
  }

  .sharing-level-info-content {
    max-width: 100%;
    max-height: min(88vh, 100%);
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .sharing-level-list li {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .sharing-level-list span {
    max-width: 100%;
    text-align: left;
  }

  .nanum-temp-guide-content {
    max-width: 100%;
  }

  .my-nanum-temp {
    font-size: 30px;
  }
}

/* Conversational 1:1 messages (쪽지) + header search */
.header-unread-badge[hidden],
.dm-pane[hidden] {
  display: none !important;
}

.header-global-search {
  position: relative;
  flex-shrink: 0;
}

.header-search-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
}

.header-search-btn:hover {
  background: #f1f3f5;
}

.header-search-btn svg {
  width: 22px;
  height: 22px;
}

.header-unread-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  z-index: 3;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fa5252;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.header-unread-badge--inline {
  position: static;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: none;
}

.user-profile,
.user-profile-dropdown-wrapper {
  overflow: visible;
}

.dm-messenger[hidden] {
  display: none !important;
}

.dm-messenger {
  position: fixed;
  inset: 0;
  z-index: 2400;
  pointer-events: none;
}

.dm-messenger.is-open {
  pointer-events: auto;
}

.dm-messenger-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
}

.dm-messenger-panel {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 380px;
  height: min(640px, calc(100vh - 96px));
  display: flex;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.dm-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
}

.dm-pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.dm-pane-head h2 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-box-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
}

.dm-box-tab {
  appearance: none;
  flex: 1;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.dm-box-tab.active {
  border-color: var(--primary-color, #ff4b4b);
  color: var(--primary-color, #ff4b4b);
  background: rgba(255, 75, 75, 0.06);
}

.dm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
}

.dm-icon-btn:hover {
  background: #f1f3f5;
}

.dm-conversation-list {
  flex: 1;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.dm-conversation-empty,
.dm-thread-empty {
  margin: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.dm-conversation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dm-conversation-item:hover,
.dm-conversation-item.is-active {
  background: #f8f9fa;
}

.dm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffe8e8;
  color: #ff7a7a;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.dm-avatar .member-profile-avatar-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.dm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-conversation-main {
  flex: 1;
  min-width: 0;
}

.dm-conversation-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-conversation-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-conversation-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.dm-conversation-preview {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-unread-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fa5252;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

.dm-thread-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 10px;
  background: #f8f9fa;
}

.dm-date-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.dm-date-sep::before,
.dm-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dee2e6;
}

.dm-date-sep span {
  padding: 0 10px;
}

.dm-bubble-row {
  display: flex;
  margin-bottom: 8px;
}

.dm-bubble-row.is-mine {
  justify-content: flex-end;
}

.dm-bubble {
  max-width: min(78%, 280px);
  padding: 9px 12px;
  border-radius: 16px;
  background: #fff;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dm-bubble-row.is-mine .dm-bubble {
  background: #d3f9d8;
}

.dm-bubble-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.dm-bubble-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.dm-bubble-time {
  font-size: 11px;
  color: var(--text-muted);
}

.dm-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.dm-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.dm-compose textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  resize: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.dm-compose textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.dm-compose #dm-compose-submit {
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--secondary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dm-compose #dm-compose-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

body.dm-messenger-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .dm-messenger-backdrop {
    display: block;
  }

  .dm-messenger-panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }

  .dm-thread-close-btn {
    display: none;
  }

  .dm-compose {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* Unicode 이모지 선택창 */
.emoji-picker-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  flex-shrink: 0;
}

.emoji-picker-btn:hover,
.emoji-picker-btn[aria-expanded="true"] {
  background-color: rgba(18, 184, 134, 0.12);
}

.write-tool-btn.emoji-picker-btn {
  width: auto;
  height: 36px;
  padding: 0 12px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-sub);
}

.write-tool-btn.emoji-picker-btn:hover,
.write-tool-btn.emoji-picker-btn[aria-expanded="true"] {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  background-color: #ffffff;
}

.write-inline-emoji-bar {
  display: flex;
  align-items: center;
  margin-top: 6px;
  min-height: 32px;
}

.detail-comment-compose-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  min-height: 32px;
}

.dm-compose .emoji-picker-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin-bottom: 4px;
  font-size: 20px;
}

.emoji-picker-panel {
  position: fixed;
  z-index: 5200;
  width: 320px;
  max-width: calc(100vw - 16px);
  max-height: min(360px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.emoji-picker-panel[hidden] {
  display: none !important;
}

.emoji-picker-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px 0;
  border-bottom: 1px solid #eef1f4;
  flex-shrink: 0;
}

.emoji-picker-tab {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.emoji-picker-tab.is-active {
  color: var(--text-main);
  border-bottom-color: var(--primary-color);
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
}

.emoji-picker-item {
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.emoji-picker-item:hover {
  background: #f3f4f6;
}

.emoji-picker-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  font-size: 12px;
  color: #8a939c;
}

@media (max-width: 480px) {
  .emoji-picker-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .emoji-picker-item {
    font-size: 20px;
  }
}

.meal-converter-view {
  max-width: 980px;
  margin: 0 auto;
}

.meal-converter-shell {
  display: grid;
  gap: 18px;
}

.meal-converter-card {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(33, 37, 41, 0.05);
}

.meal-converter-card-heading,
.meal-converter-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meal-converter-card-heading h3,
.meal-converter-result-header h3 {
  margin: 0 0 5px;
  color: var(--text-main);
  font-size: 18px;
}

.meal-converter-card-heading p,
.meal-converter-result-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.meal-converter-card-heading > svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.meal-converter-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border: 1px dashed #96f2d7;
  border-radius: 12px;
  background: #f8fffc;
}

.meal-converter-upload-actions .file-drop-hint {
  flex: 1 0 100%;
  margin: 0;
}

.meal-converter-select-btn,
.meal-converter-analyze-btn,
.meal-converter-download-btn,
.meal-converter-register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.meal-converter-select-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: #e6fcf5;
  color: #087f5b;
}

.meal-converter-select-btn svg,
.meal-converter-download-btn svg,
.meal-converter-register-btn svg {
  width: 17px;
  height: 17px;
}

.meal-converter-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-sub);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-converter-analyze-btn,
.meal-converter-download-btn,
.meal-converter-register-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px 18px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
}

.meal-converter-analyze-btn:disabled,
.meal-converter-download-btn:disabled,
.meal-converter-register-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.meal-converter-privacy {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  text-align: center;
}

.meal-converter-message {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #e7f5ff;
  color: #1864ab;
  font-size: 13px;
  white-space: pre-line;
}

.meal-converter-message.is-error {
  background: #fff5f5;
  color: #c92a2a;
}

.meal-converter-message.is-success {
  background: #ebfbee;
  color: #2b8a3e;
}

.meal-converter-result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.meal-converter-result-actions .meal-converter-download-btn,
.meal-converter-result-actions .meal-converter-register-btn {
  margin-top: 0;
}

.meal-converter-register-btn {
  background: #0b7285;
}

.meal-converter-board-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  background: #f1f3f5;
  color: #495057;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.meal-converter-board-link-btn svg {
  width: 17px;
  height: 17px;
}

.meal-converter-board-link-btn:hover {
  background: #e9ecef;
}

.meal-converter-board-link-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  background: #f8f9fa;
}

.meal-converter-board-link-panel[hidden] {
  display: none !important;
}

.meal-converter-board-link-guide {
  margin: 0 0 10px;
  color: #495057;
  font-size: 13px;
  font-weight: 600;
}

.meal-converter-board-link-label {
  display: block;
  margin-bottom: 6px;
  color: #868e96;
  font-size: 12px;
}

.meal-converter-board-link-input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}

.meal-converter-board-link-save {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #dee2e6;
  color: #343a40;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.meal-converter-register-hint {
  margin: 8px 0 0;
  color: #c92a2a;
  font-size: 13px;
}

.meal-converter-register-hint .meal-converter-settings-btn,
.school-photo-connection-row > .meal-converter-settings-btn {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #c92a2a;
  border-radius: 8px;
  background: #fff;
  color: #c92a2a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.meal-converter-register-hint .meal-converter-settings-btn[hidden],
.school-photo-connection-row > .meal-converter-settings-btn[hidden] {
  display: none;
}

.meal-converter-register-hint .meal-converter-settings-btn {
  margin-left: 8px;
}

.school-photo-school-field {
  margin: 0 0 12px;
  min-width: 0;
}

.school-photo-school-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.school-photo-school-field select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font: inherit;
}

.school-photo-connection-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.school-photo-connection-row .meal-converter-register-hint {
  margin: 0;
}

.meal-converter-view #meal-converter-school-card h3,
.school-photo-upload-view .meal-converter-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.school-photo-target-text {
  margin: 0;
  white-space: pre-line;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
}

#view-school-homepage-settings .meal-converter-shell {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.school-home-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.school-home-empty {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
}

.school-home-school-card h3 {
  margin-bottom: 6px;
}

.school-home-status {
  margin: 0 0 4px;
  color: #2b8a3e;
  font-size: 13px;
  font-weight: 700;
}

.school-home-url {
  margin: 0 0 4px;
  color: var(--text-sub);
  font-size: 13px;
  word-break: break-all;
}

.school-home-add-btn {
  margin-top: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.school-home-add-btn:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.school-home-add-btn:active {
  transform: translateY(1px);
}

.school-home-edit-btn {
  border: 1px solid #ffc9c9;
  background: #fff5f5;
  color: var(--primary-color);
}

.school-home-edit-btn:hover {
  border-color: var(--primary-color);
  background: #ffe3e3;
}

.school-home-school-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.school-home-school-card.is-selectable:hover {
  border-color: #96f2d7;
}

.school-home-school-card.is-selected {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 1px var(--secondary-color), 0 8px 26px rgba(33, 37, 41, 0.05);
}

.school-home-selected-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6fcf5;
  color: #2b8a3e;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.school-home-card-hint {
  margin: 8px 0 0;
  color: #c92a2a;
  font-size: 13px;
}

.school-home-settings-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.school-home-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 6px;
}

.school-home-label-row label {
  margin: 0;
}

.school-home-help-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.school-home-help-btn::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.school-home-help-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.school-home-login-url-help-content {
  width: min(720px, 94vw);
  max-width: min(720px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}

.school-home-login-url-help-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f8f9fa;
}

.school-home-login-url-help-caption {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 768px) {
  .school-home-login-url-help-content {
    width: 100%;
    max-width: 100%;
    max-height: min(90vh, 100%);
  }

  .school-home-login-url-help-content .modal-header-desc h3 {
    padding-right: 28px;
  }
}

.school-home-settings-form input:not([type="checkbox"]),
.school-home-settings-form select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font: inherit;
}

.school-home-settings-form .school-home-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 6px;
}

.school-home-toggle {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 44px;
  height: 24px;
}

.school-home-toggle input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 44px;
  max-width: 44px;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.school-home-toggle-ui {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #ced4da;
  pointer-events: none;
  transition: background-color 0.16s ease;
}

.school-home-toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(33, 37, 41, 0.22);
  transition: transform 0.16s ease;
}

.school-home-toggle input:checked + .school-home-toggle-ui {
  background: var(--primary-color);
}

.school-home-toggle input:checked + .school-home-toggle-ui::after {
  transform: translateX(20px);
}

.school-home-toggle input:focus-visible + .school-home-toggle-ui {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.school-home-settings-form input::placeholder {
  color: #adb5bd;
  opacity: 1;
}

.school-home-form-msg {
  margin: 12px 0 0;
  color: #c92a2a;
  font-size: 13px;
}

.school-home-password-hint,
.school-home-name-hint {
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 12px;
}

.school-home-settings-form {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.school-home-form-actions {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
}

.school-home-form-actions .school-home-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  box-sizing: border-box;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

#school-homepage-form-cancel {
  display: none !important;
}

.school-photo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.school-photo-form-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.school-photo-form-grid input,
.school-photo-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font: inherit;
}

.school-photo-file-field {
  grid-column: 1 / -1;
}

.school-photo-file-name {
  display: none;
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 12px;
}

.school-photo-preview {
  margin: 12px 0 0;
}

.school-photo-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
}

.school-photo-upload-view .meal-converter-register-btn {
  margin-top: 16px;
  width: 100%;
}

#school-photo-upload-btn {
  background: var(--primary-color);
  min-height: 48px;
}

#school-photo-upload-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

#school-photo-upload-btn.is-busy {
  pointer-events: none;
}

#school-photo-upload-btn.is-busy:disabled {
  opacity: 1;
  cursor: wait;
}

#school-photo-upload-btn .school-photo-upload-btn-label {
  display: inline-block;
}

.school-photo-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #e7f5ff;
  color: #1864ab;
}

.school-photo-progress[hidden] {
  display: none;
}

.school-photo-progress-spinner {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid rgba(24, 100, 171, 0.28);
  border-top-color: #1864ab;
  border-radius: 50%;
  animation: school-photo-spin 0.7s linear infinite;
}

.school-photo-progress-text {
  min-width: 0;
  flex: 1;
}

.school-photo-progress-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}

.school-photo-progress-text p + p {
  margin-top: 2px;
  font-size: 12px;
}

@keyframes school-photo-spin {
  to { transform: rotate(360deg); }
}

.school-photo-calendar-wrap {
  margin-top: 10px;
}

.school-photo-calendar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #74c0fc;
  border-radius: 9px;
  background: #fff;
  color: #1864ab;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.school-photo-calendar-link:hover {
  background: #e7f5ff;
}

.school-photo-homepage-confirm {
  margin-top: 10px;
}

.school-photo-homepage-confirm[hidden] {
  display: none;
}

.school-photo-homepage-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #74c0fc;
  border-radius: 9px;
  background: #fff;
  color: #1864ab;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.school-photo-homepage-confirm-btn:hover {
  background: #e7f5ff;
}

/* 급식사진 자동업로드 회원 화면만 세로 간격 축소 (공통 카드/폼·설정 화면 제외) */
#view-school-photo-upload .board-header .view-subtitle {
  margin-top: 4px;
}

#view-school-photo-upload .meal-converter-shell {
  gap: 14px;
}

#view-school-photo-upload .meal-converter-card {
  padding: 18px;
}

#view-school-photo-upload .meal-converter-card h3 {
  margin: 0 0 7px;
}

#view-school-photo-upload .school-photo-form-grid label {
  margin-bottom: 4px;
}

#view-school-photo-upload .school-photo-connection-row {
  justify-content: space-between;
  gap: 8px;
}

#view-school-photo-upload #school-photo-target-card > h3 {
  display: none;
}

#view-school-photo-upload .school-photo-form-grid {
  gap: 9px;
}

#view-school-photo-upload .school-photo-file-name {
  display: none;
  margin: 4px 0 0;
}

#view-school-photo-upload .school-photo-preview {
  margin: 9px 0 0;
}

#view-school-photo-upload .school-photo-meal-feed-option {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

#view-school-photo-upload .meal-converter-register-btn {
  margin-top: 12px;
}

#view-school-photo-upload #school-photo-meal-feed-result {
  margin-top: 10px;
}

#view-school-photo-upload .school-photo-progress {
  margin-top: 10px;
  padding: 9px 14px;
}

#view-school-photo-upload .meal-converter-message {
  margin-top: 10px;
  padding: 8px 13px;
}

#view-school-photo-upload .school-photo-calendar-wrap {
  margin-top: 8px;
}

@media (max-width: 768px) {
  #view-school-photo-upload .meal-converter-shell {
    gap: 10px;
  }

  #view-school-photo-upload .meal-converter-card {
    padding: 12px 14px;
  }

  #view-school-photo-upload .school-photo-form-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #view-school-photo-upload .school-photo-form-grid > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  #view-school-photo-upload .school-photo-form-grid label {
    flex: 0 0 6em;
    width: 6em;
    margin-bottom: 0;
    white-space: nowrap;
  }

  #view-school-photo-upload .school-photo-form-grid input,
  #view-school-photo-upload .school-photo-form-grid select {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 6px 10px;
  }

  #view-school-photo-upload .school-photo-file-field input[type="file"] {
    padding: 0;
    border: 0;
    border-radius: 0;
    min-height: 0;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #view-school-photo-upload .school-photo-preview {
    margin: 6px 0 0;
  }

  #view-school-photo-upload .meal-converter-register-btn {
    margin-top: 8px;
  }
}

.meal-converter-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.meal-converter-badges span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #495057;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

#meal-converter-ai-badge.is-free {
  background: #e6fcf5;
  color: #087f5b;
}

#meal-converter-ai-badge.is-ai {
  background: #fff4e6;
  color: #d9480f;
}

.meal-converter-warnings {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #ffe066;
  border-radius: 10px;
  background: #fff9db;
  color: #5f3f00;
  font-size: 12.5px;
  line-height: 1.6;
}

.meal-converter-warnings ul {
  margin: 0;
  padding-left: 18px;
}

.meal-converter-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 11px;
}

.meal-converter-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.meal-converter-table th,
.meal-converter-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f2;
  color: var(--text-sub);
  font-size: 12.5px;
  text-align: left;
  vertical-align: top;
}

.meal-converter-table th {
  background: #f8f9fa;
  color: var(--text-main);
  font-weight: 700;
}

.meal-converter-table th:nth-child(1) { width: 90px; }
.meal-converter-table th:nth-child(2) { width: 66px; }
.meal-converter-table th:nth-child(4) { width: 76px; }
.meal-converter-table th:nth-child(5) { width: 82px; }
.meal-converter-table tbody tr:last-child td { border-bottom: 0; }

.meal-converter-menu-details summary {
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
}

.meal-converter-menu-details ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

.meal-converter-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e6fcf5;
  color: #087f5b;
  font-size: 11px;
  font-weight: 700;
}

.meal-converter-status.needs-review {
  background: #fff3bf;
  color: #8f5b00;
}

.meal-converter-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #c92a2a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* 채용정보 허브: 커뮤니티와 동일한 상단·탭·카드 규칙 */
#view-reviews .board-header {
  align-items: center;
  margin-bottom: 16px;
}

#view-reviews .community-title-block {
  min-width: 0;
  flex: 1 1 auto;
}

#view-reviews .view-title {
  font-size: 16px;
  margin-bottom: 0;
}

#view-reviews .board-header .write-btn {
  margin-top: 0;
  flex-shrink: 0;
}

#view-reviews .category-pills {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

#view-reviews .category-pills::-webkit-scrollbar {
  display: none;
}

#view-reviews .pill-btn {
  flex: 0 0 auto;
}

.job-hub-site-panel {
  margin: 12px 0 4px;
}

/* 채용정보 허브 목록이 본 목록이다. .feed-list { display:flex } 가 [hidden]을 덮어 긴 카드가 한 번 더 보이던 것을 막는다. */
#job-recent-feed-list,
#job-recent-feed-list[hidden] {
  display: none !important;
}

@media (min-width: 1100px) {
  #job-hub-posts-list .feed-post-card {
    align-items: stretch;
    gap: 12px;
  }

  #job-hub-posts-list .post-footer {
    margin-top: auto;
  }

  #job-hub-posts-list .post-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #job-hub-posts-list .feed-post-card .post-content,
  #job-hub-posts-list .feed-post-card.has-thumb .post-content {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #job-hub-posts-list .feed-post-thumb,
  #job-hub-posts-list .feed-post-card:not(.has-thumb)::after {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    align-self: center;
  }
}

@media (max-width: 768px) {
  #view-reviews .category-pills-container {
    flex-wrap: wrap;
    align-items: center;
  }

  #view-reviews .category-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 5px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #view-reviews .pill-btn {
    height: 40px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  #view-reviews .pill-icon {
    display: none;
  }

  #view-reviews .category-pills-container > .community-sort {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
    justify-content: flex-end;
  }

  #job-hub-posts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================================
   업무체크 — 기존 카드/탭/입력창 토큰 재사용
   ========================================================================== */
.work-check-view .view-subtitle {
  word-break: keep-all;
}

.work-check-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-check-layout.is-custom {
  display: block;
  position: relative;
}

.work-check-layout.is-custom .work-check-top {
  display: contents;
}

.work-check-layout.is-custom .work-check-card {
  position: absolute;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.work-check-layout.is-custom .work-check-list,
.work-check-layout.is-custom .work-check-cal-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.work-check-card-resize {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 3;
  background:
    linear-gradient(135deg, transparent 0 45%, #b8c0cc 45% 55%, transparent 55% 70%, #b8c0cc 70% 80%, transparent 80%);
}

.work-check-layout.is-editing .work-check-card-head {
  cursor: grab;
  user-select: none;
}

.work-check-layout.is-editing .work-check-card-head:active {
  cursor: grabbing;
}

.work-check-layout.is-editing .work-check-card-resize {
  display: block;
}

.work-check-layout.is-editing .work-check-card {
  outline: 2px dashed rgba(109, 92, 196, 0.28);
  outline-offset: -2px;
}

.work-check-layout-edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.work-check-layout-edit-actions[hidden] {
  display: none !important;
}

.work-check-layout-save {
  background: #212529;
  border-color: #212529;
  color: #fff;
}

.work-check-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
  min-height: 480px;
  height: min(560px, 70vh);
}

@media (min-width: 769px) {
  .work-check-layout:not(.is-custom) .work-check-top {
    align-items: start;
    height: auto;
    min-height: 0;
  }

  .work-check-layout:not(.is-custom) .work-check-card--today {
    min-height: 480px;
    height: min(560px, 70vh);
    overflow: hidden;
  }

  .work-check-layout:not(.is-custom) .work-check-card--month {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .work-check-layout:not(.is-custom) .work-check-month-col .work-check-list {
    flex: 0 0 auto;
    height: calc((36px * 8) + (7px * 7) + 12px);
    min-height: calc((36px * 8) + (7px * 7) + 12px);
    max-height: calc((36px * 8) + (7px * 7) + 12px);
  }
}

.work-check-card--today,
.work-check-card--month {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}

.work-check-card--today .work-check-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
}

.work-check-card--today .work-check-add-btn {
  flex: 0 0 auto;
  margin-top: 4px;
}

.work-check-month-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.work-check-month-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.work-check-month-col .work-check-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
}

.work-check-month-col .work-check-add-btn {
  flex: 0 0 auto;
  margin-top: 4px;
}

.work-check-card--month .work-check-card-footer {
  flex: 0 0 auto;
  margin-top: 8px;
}

.work-check-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px 24px;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(20, 20, 30, 0.045);
}

.work-check-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -22px -24px 14px;
  padding: 14px 24px;
  border-radius: 14px 14px 0 0;
  background: #f5f5f8;
}

.work-check-card-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  min-width: 0;
}

.work-check-today-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.work-check-today-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}

.work-check-today-jump {
  appearance: none;
  margin-left: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: #ffe6ac;
  color: #8a5c12;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.work-check-today-jump:hover,
.work-check-today-jump:focus-visible {
  background: #ffd77a;
}

.work-check-today-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 2px;
}

.work-check-carry-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.work-check-carry-opt input {
  margin: 0;
}

.work-check-today-tools .work-check-carry-btn {
  margin-top: 0;
  padding: 0;
  font-size: 12.5px;
}

.work-check-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #e9e9ee;
  color: var(--text-sub);
}

.work-check-card-icon i,
.work-check-card-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.3px;
}

/* 오늘 할 일 — 연한 크림색 */
.work-check-card--today .work-check-card-head {
  background: #fff6e2;
}
.work-check-card--today .work-check-card-icon {
  background: #ffe6ac;
  color: #b1791f;
}

/* 월 업무 — 연한 라벤더색 */
.work-check-card--month .work-check-card-head {
  background: #f1edfb;
}
.work-check-card--month .work-check-card-icon {
  background: #e0d3f8;
  color: #6d5cc4;
}

/* 월간 달력 — 연한 민트색 */
.work-check-cal-card .work-check-card-head {
  background: #e8f6f0;
}
.work-check-cal-card .work-check-card-icon {
  background: #cdecdf;
  color: #0f9268;
}

.work-check-month-nav {
  appearance: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.work-check-month-nav:hover,
.work-check-month-nav:focus-visible {
  background: #f1f3f5;
}

.work-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  min-height: 72px;
}

.work-check-empty {
  padding: 18px 4px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.work-check-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  height: auto;
  min-height: 36px;
  padding: 8px 2px 8px 1.6px;
  overflow: visible;
  border-radius: 10px;
  border-top: 1px solid #f1eef8;
}

.work-check-list > .work-check-item:first-child {
  border-top: 0;
}

.work-check-item.is-dragging {
  opacity: 0.7;
  background: #f8f9fa;
}

.work-check-item.is-drop-before {
  box-shadow: inset 0 2px 0 var(--primary-color);
}

.work-check-item.is-drop-after {
  box-shadow: inset 0 -2px 0 var(--primary-color);
}

.work-check-card--today .work-check-list,
.work-check-month-col .work-check-list {
  scrollbar-width: thin;
  scrollbar-color: #cfd4da transparent;
}

.work-check-card--today .work-check-list::-webkit-scrollbar,
.work-check-month-col .work-check-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.work-check-card--today .work-check-list::-webkit-scrollbar-track,
.work-check-month-col .work-check-list::-webkit-scrollbar-track {
  background: transparent;
}

.work-check-card--today .work-check-list::-webkit-scrollbar-thumb,
.work-check-month-col .work-check-list::-webkit-scrollbar-thumb {
  background: #cfd4da;
  border-radius: 999px;
}

.work-check-card--today .work-check-list::-webkit-scrollbar-corner,
.work-check-month-col .work-check-list::-webkit-scrollbar-corner {
  background: transparent;
}

.work-check-layout-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 6;
}

.work-check-layout-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.work-check-layout-icon-btn:hover,
.work-check-layout-icon-btn:focus-visible {
  background: #eceff3;
  color: var(--text-main);
}

.work-check-layout-icon-btn.is-active,
.work-check-layout-icon-btn[aria-pressed="true"] {
  background: #efeafc;
  color: #6d5cc4;
}

.work-check-layout-icon-btn svg {
  width: 20px;
  height: 20px;
}

.work-check-view.is-order-editing .work-check-card--today .work-check-item,
.work-check-view.is-order-editing .work-check-month-columns .work-check-item {
  cursor: grab;
  user-select: none;
}

.work-check-view.is-order-editing .work-check-card--today .work-check-item:active,
.work-check-view.is-order-editing .work-check-month-columns .work-check-item:active {
  cursor: grabbing;
}

.work-check-view.is-order-editing .work-check-check input,
.work-check-view.is-order-editing .work-check-menu-btn {
  cursor: pointer;
}

.work-check-drag {
  display: none !important;
  appearance: none;
  flex: 0 0 22px;
  width: 22px;
  height: 26px;
  margin-top: 2px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #868e96;
  cursor: grab;
  touch-action: none;
}

.work-check-drag span {
  display: block;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}

.work-check-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}

.work-check-check input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  border: 1.5px solid #beb5ec;
  border-radius: 5px;
  background: #ffffff;
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.work-check-check input:hover {
  border-color: #9d8fe8;
}

.work-check-check input:checked {
  background: #7c6fe0;
  border-color: #7c6fe0;
}

.work-check-check input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.work-check-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.work-check-item-title {
  display: block;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.05;
  letter-spacing: -0.08em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.work-check-item.is-highlighted,
.work-check-item.is-highlighted .work-check-item-title,
.work-check-item.is-highlighted .work-check-item-details,
.work-check-item.is-highlighted .work-check-item-date,
.work-check-item.is-highlighted .work-check-item-origin {
  color: #289B6E;
}

.work-check-item.is-highlighted .work-check-check input {
  border-color: #289B6E;
  accent-color: #289B6E;
}

.work-check-item.is-highlighted .work-check-check input:hover {
  border-color: #1f7d58;
}

.work-check-item.is-highlighted .work-check-check input:checked {
  background: #289B6E;
  border-color: #289B6E;
}

.work-check-item.is-done.is-highlighted .work-check-item-title,
.work-check-item.is-done.is-highlighted .work-check-item-details {
  color: #289B6E;
}

.work-check-item-title.is-editing {
  outline: 1.5px solid var(--primary-color);
  border-radius: 6px;
  padding: 1px 4px;
  background: #ffffff;
  cursor: text;
  text-decoration: none;
  color: var(--text-main);
}

.work-check-item.is-done .work-check-item-title {
  text-decoration: line-through;
  color: var(--text-sub);
}

.work-check-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
}

.work-check-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.work-check-item-details {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: keep-all;
}

.work-check-item.is-done .work-check-item-details {
  text-decoration: line-through;
}

.work-check-menu {
  position: relative;
  flex: 0 0 auto;
  margin-top: 2px;
}

.work-check-menu-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.work-check-menu-btn:hover,
.work-check-menu.is-open .work-check-menu-btn {
  background: #f1f3f5;
  color: var(--text-main);
}

.work-check-menu-pop {
  display: none;
  position: absolute;
  top: 26px;
  right: 0;
  z-index: 8;
  min-width: 148px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.work-check-menu.is-open .work-check-menu-pop {
  display: flex;
  flex-direction: column;
}

.work-check-menu-pop button {
  appearance: none;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.work-check-menu-pop button:hover {
  background: #f8f9fa;
}

.work-check-add-btn,
.work-check-text-btn {
  appearance: none;
  margin-top: 10px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.work-check-add-btn:hover,
.work-check-text-btn:hover {
  color: var(--primary-color);
}

.work-check-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.work-check-cal-head-row {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
}

.work-check-cal-filters {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.work-check-cal-filters-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.work-check-cal-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
  cursor: pointer;
}

.work-check-cal-filter input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0f9268;
}

.work-check-cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.work-check-cal-nav strong {
  min-width: 110px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.work-check-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.work-check-cal-head {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}

.work-check-cal-cell {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  height: 92px;
  min-height: 92px;
  max-height: 92px;
  padding: 6px 6px 8px;
  border: 1.5px solid #eef1f4;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  overflow: hidden;
}

.work-check-cal-cell.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.work-check-cal-cell.is-saturday {
  background: #edf4fd;
}

.work-check-cal-cell.is-sunday,
.work-check-cal-cell.is-holiday {
  background: #fcecf0;
}

.work-check-cal-cell.is-sunday .work-check-cal-num,
.work-check-cal-cell.is-holiday .work-check-cal-num {
  color: #e0324f;
}

.work-check-cal-cell.is-today {
  border-color: var(--primary-color);
}

.work-check-cal-cell.is-selected {
  background: #fff8f8;
}

.work-check-cal-date {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  margin: 2px 0 0 2px;
}

.work-check-cal-num {
  display: block;
  flex: 0 0 auto;
  min-height: 18px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  color: var(--text-main);
}

.work-check-cal-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin-top: 6px;
  overflow: hidden;
}

.work-check-cal-holiday {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 10px;
  font-weight: 700;
  color: #d1274a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-check-cal-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.work-check-cal-task {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0 0 0 4px;
  border-left: 2px solid transparent;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-sub);
}

.work-check-cal-task-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.work-check-cal-task-title {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-check-cal-task.is-origin-today {
  border-left-color: #e8c35a;
}

.work-check-cal-task.is-origin-today .work-check-cal-task-dot {
  background: #e8c35a;
}

.work-check-cal-task.is-origin-monthly {
  border-left-color: #b7a3e3;
}

.work-check-cal-task.is-origin-monthly .work-check-cal-task-dot {
  background: #b7a3e3;
}

.work-check-cal-task.is-origin-added {
  border-left-color: #7dcaa0;
}

.work-check-cal-task.is-origin-added .work-check-cal-task-dot {
  background: #7dcaa0;
}

.work-check-cal-task.is-done {
  color: #b8bcc4;
  text-decoration: none;
}

.work-check-cal-task.is-done .work-check-cal-task-title {
  text-decoration: line-through;
}

.work-check-item-origin {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
}

.work-check-item-origin.is-today {
  color: #b8860b;
}

.work-check-item-origin.is-monthly {
  color: #6d5cc4;
}

.work-check-item-origin.is-added {
  color: #0f9268;
}

.work-check-cal-more {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.work-check-day-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.work-check-day-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.work-check-day-panel-head h4 {
  font-size: 14.5px;
  font-weight: 800;
}

.work-check-day-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.work-check-day-panel-actions .work-check-add-btn,
.work-check-day-panel-actions .work-check-text-btn {
  margin-top: 0;
}

.work-check-modal-content {
  max-width: 420px;
}

.work-check-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.work-check-form-actions .submit-btn {
  flex: 1 1 auto;
  margin-top: 0;
}

.work-check-form-error {
  margin: 0 0 8px;
  color: var(--primary-color);
  font-size: 13px;
}

.work-check-hidden-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-check-hidden-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #eef1f4;
  border-radius: 10px;
}

.work-check-hidden-item .work-check-text-btn {
  margin-top: 0;
}

.work-check-annual-modal-content {
  max-width: 560px;
  max-height: min(82vh, 760px);
  overflow: auto;
}

.work-check-annual-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-check-annual-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.work-check-annual-group-list,
.work-check-annual-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-check-annual-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
}

.work-check-annual-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.work-check-annual-item .work-check-text-btn {
  margin-top: 0;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .work-check-top {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .work-check-card--today,
  .work-check-card--month {
    height: auto;
    overflow: visible;
  }

  .work-check-month-columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .work-check-month-col .work-check-list,
  .work-check-card--today .work-check-list {
    overflow: visible;
    height: auto;
    min-height: 72px;
    max-height: none;
    flex: 1 1 auto;
    padding-right: 0;
    scrollbar-gutter: auto;
  }

  .work-check-drag {
    touch-action: pan-y;
  }

  .work-check-item.is-dragging .work-check-drag {
    touch-action: none;
  }

  .work-check-card {
    padding: 18px 16px;
  }

  .work-check-card-head {
    margin: -18px -16px 14px;
    padding: 12px 16px;
  }

  .work-check-item {
    height: auto;
    min-height: 38px;
  }

  .work-check-cal-cell {
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    padding: 4px 4px 6px;
  }

  .work-check-cal-num {
    min-height: 16px;
    margin: 0;
    font-size: 12px;
  }

  .work-check-cal-body {
    margin-top: 4px;
  }

  .work-check-cal-holiday {
    font-size: 9px;
  }

  .work-check-cal-filters {
    flex: 1 1 100%;
    order: 3;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .work-check-cal-nav {
    margin-left: auto;
  }

  .work-check-cal-filter {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
  }

  .work-check-cal-task {
    font-size: 10px;
  }
}


/* ==================== 급식 계약 내역 (school-bid-contracts, sbc-*) ==================== */
.sbc-view {
  overflow-x: hidden !important;
  max-width: 100%;
}
.sbc-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.sbc-school-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sbc-school-current {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.sbc-school-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sbc-school-form-lead {
  margin: 0 0 8px;
  font-size: 14px;
  color: #4b5563;
}

.sbc-school-form label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.sbc-school-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}

.sbc-school-form-error {
  margin: 0;
  font-size: 13px;
  color: #dc2626;
}

.sbc-school-form-actions {
  margin-top: 8px;
  padding: 0;
  border: 0;
}

.sbc-school-form-actions .sbc-btn {
  width: 100%;
}

#sbc-school-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}

#sbc-school-modal.is-open {
  display: flex !important;
}

.sbc-my-school-row,
.sbc-search-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sbc-my-school-row label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.sbc-my-school-input-group,
.sbc-search-row {
  display: flex;
  gap: 8px;
}

.sbc-my-school-input-group input,
.sbc-search-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}

.sbc-hint {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
}

.sbc-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sbc-btn-primary {
  background: #2563eb;
  color: #fff;
}

.sbc-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.sbc-btn-ghost {
  background: transparent;
  color: #2563eb;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sbc-tabs {
  display: none !important;
}

.sbc-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sbc-tab,
.sbc-type-tab {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
  white-space: nowrap;
}

.sbc-tab.is-active,
.sbc-type-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.sbc-items-note {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  word-break: keep-all;
}

.sbc-items-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sbc-items-month-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.sbc-items-month-label select,
.sbc-items-search {
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  min-width: 0;
  max-width: 100%;
}

.sbc-items-search {
  flex: 1;
}

.sbc-status,
.sbc-empty {
  text-align: center;
  padding: 24px 12px;
  color: #6b7280;
  font-size: 14px;
}

.sbc-empty--error {
  color: #dc2626;
}


.sbc-school-choices {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.sbc-school-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
}

.sbc-school-choice:hover,
.sbc-school-choice:focus-visible {
  border-color: #93c5fd;
  outline: none;
}

.sbc-school-choice-name {
  font-weight: 600;
  color: #111827;
}

.sbc-school-choice-meta {
  color: #6b7280;
  font-size: 13px;
}

.sbc-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.sbc-table-wrap {
  display: none;
  width: 100%;
  overflow-x: auto;
}

.sbc-table-wrap:not([hidden]) {
  display: block;
}

.sbc-table-wrap.sbc-table-wrap--scroll:not([hidden]) {
  max-height: min(72vh, calc(45px + 15 * 58px));
  overflow-x: auto;
  overflow-y: auto;
}

.sbc-table-wrap--scroll .sbc-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 #e5e7eb;
}

.sbc-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.sbc-table th,
.sbc-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.45;
  color: #111827;
}

.sbc-table th {
  font-weight: 700;
  background: #f9fafb;
  text-align: center;
}

.sbc-table th:nth-child(1),
.sbc-table td:nth-child(1) { width: 9%; }
.sbc-table th:nth-child(2),
.sbc-table td:nth-child(2) { width: 9%; white-space: nowrap; }
.sbc-table th:nth-child(3),
.sbc-table td:nth-child(3) { width: 21%; }
.sbc-table th:nth-child(4),
.sbc-table td:nth-child(4) { width: 12%; }
.sbc-table th:nth-child(5),
.sbc-table td:nth-child(5) { width: 11%; }
.sbc-table th:nth-child(6),
.sbc-table td:nth-child(6) { width: 11%; }
.sbc-table th:nth-child(7),
.sbc-table td:nth-child(7) { width: 11%; }
.sbc-table th:nth-child(8),
.sbc-table td:nth-child(8) { width: 9%; }
.sbc-table th:nth-child(9),
.sbc-table td:nth-child(9) { width: 7%; }

.sbc-table .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sbc-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
  overflow: hidden !important;
  box-sizing: border-box;
}

.sbc-card:hover,
.sbc-card:focus-visible {
  border-color: #2563eb;
  outline: none;
}

.sbc-card-month {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sbc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.sbc-badge-joint {
  background: #fef3c7;
  color: #92400e;
}

.sbc-badge-type {
  background: #eef2ff;
  color: #3730a3;
}

.sbc-card-schools {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.sbc-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.sbc-table-title,
.sbc-table .sbc-title-link,
.sbc-card .sbc-title-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: inherit;
  color: #111827;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sbc-table .sbc-title-link:hover,
.sbc-table .sbc-title-link:focus,
.sbc-table .sbc-title-link:visited,
.sbc-table .sbc-title-link:active,
.sbc-card .sbc-title-link:hover,
.sbc-card .sbc-title-link:focus,
.sbc-card .sbc-title-link:visited,
.sbc-card .sbc-title-link:active {
  color: #111827;
  text-decoration: none;
}

.sbc-table .sbc-title-link:focus-visible,
.sbc-card .sbc-title-link:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  text-decoration: none;
}

.sbc-card-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.sbc-card-label {
  color: #6b7280;
  flex-shrink: 0;
}

.sbc-card-value {
  color: #111827;
  text-align: right;
  min-width: 0;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

.sbc-card-value--amount {
  font-weight: 700;
  color: #059669;
}

.sbc-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.sbc-card-actions .sbc-btn,
.sbc-card-actions .sbc-btn-ghost {
  flex: 1;
  height: 38px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sbc-card-actions .sbc-btn-ghost {
  background: #fff;
}

.sbc-source-note {
  margin: 0;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

.sbc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5600;
  padding: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.sbc-modal-overlay.active,
.sbc-modal-overlay.is-open {
  display: flex;
}

/* display:flex 가 [hidden]의 display:none 을 덮어쓰지 않도록 */
.sbc-modal-overlay[hidden],
#sbc-detail-modal:not(.is-open) {
  display: none !important;
  pointer-events: none !important;
}

#sbc-detail-modal.is-open {
  display: flex !important;
}

.sbc-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: min(1100px, calc(100vw - 32px));
  max-height: 85vh;
  overflow-x: hidden !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#sbc-school-modal .sbc-modal {
  max-width: min(420px, calc(100vw - 32px));
}

.sbc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.sbc-modal-head h3 {
  margin: 0;
  font-size: 16px;
  word-break: break-word;
}

.sbc-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.sbc-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
  overflow-x: hidden !important;
  overflow-y: visible;
  box-sizing: border-box;
}

#sbc-school-modal .sbc-school-form input,
#sbc-school-modal .sbc-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sbc-eat-item-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sbc-eat-item-table {
  min-width: 960px;
  width: 100%;
  border-collapse: collapse;
}

.sbc-eat-item-table thead th {
  position: sticky;
  top: 0;
  background: #c4a574;
  color: #fff;
}

.sbc-eat-item-table td:nth-last-child(-n+3),
.sbc-eat-item-table th:nth-last-child(-n+3) {
  text-align: right;
}

.sbc-eat-item-row {
  cursor: pointer;
}

.sbc-eat-item-row[aria-expanded="true"] {
  background: #faf7f2;
}

.sbc-eat-item-expand > td {
  padding: 8px 0 12px;
  background: #f9fafb;
}

.sbc-eat-item-expand-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: collapse;
}

.sbc-eat-item-expand-table thead th {
  background: #d4b896;
  color: #fff;
}

.sbc-eat-item-expand-table th,
.sbc-eat-item-expand-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.sbc-eat-item-expand-table td:nth-last-child(-n+3),
.sbc-eat-item-expand-table th:nth-last-child(-n+3) {
  text-align: right;
}

.sbc-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sbc-detail-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.sbc-detail-value {
  font-size: 14px;
  color: #111827;
  word-break: keep-all;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

.sbc-modal-footer {
  padding: 14px 18px;
  border-top: 1px solid #f3f4f6;
}

.sbc-table .sbc-supplier-link,
.sbc-card .sbc-supplier-link {
  background: none;
  border: 0;
  padding: 0;
  color: #111827;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sbc-table .sbc-supplier-link:hover,
.sbc-table .sbc-supplier-link:focus,
.sbc-table .sbc-supplier-link:visited,
.sbc-table .sbc-supplier-link:active,
.sbc-card .sbc-supplier-link:hover,
.sbc-card .sbc-supplier-link:focus,
.sbc-card .sbc-supplier-link:visited,
.sbc-card .sbc-supplier-link:active {
  color: #111827;
  text-decoration: none;
}

.sbc-table .sbc-supplier-link:focus-visible,
.sbc-card .sbc-supplier-link:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  text-decoration: none;
}

.sbc-supplier-dialog {
  max-width: 440px;
}

.sbc-supplier-empty {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.sbc-modal-footer .sbc-btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (min-width: 1024px) {
  #sbc-list-panel .sbc-results {
    display: none;
  }

  #sbc-list-panel .sbc-table-wrap:not([hidden]) {
    display: block;
  }
}

@media (max-width: 1023px) {
  #sbc-list-panel .sbc-table-wrap {
    display: none !important;
  }
}

/* PC(≥900px): 결과를 2열 카드 그리드로 — 절대 표를 그대로 축소하지 않는다 */
@media (min-width: 900px) {
  .sbc-results {
    grid-template-columns: repeat(2, 1fr);
  }

  .sbc-my-school-input-group {
    max-width: 480px;
  }

  .sbc-search-row {
    flex-direction: row;
  }

  .sbc-search-row input {
    max-width: 480px;
  }
}

@media (max-width: 480px) {
  .sbc-panel {
    padding: 14px;
    border-radius: 10px;
    overflow-x: hidden;
  }

  .sbc-card {
    padding: 12px;
    overflow: hidden;
  }

  .sbc-card-row {
    flex-direction: column;
    gap: 2px;
  }

  .sbc-card-value {
    text-align: left;
  }

  .sbc-card,
  .sbc-card-title,
  .sbc-card-value,
  .sbc-card-schools {
    word-break: keep-all;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
  }

  .sbc-modal,
  .sbc-modal-body,
  .sbc-results {
    overflow-x: hidden;
  }
}


/* 업무도구 순서 편집: 평소에는 작은 아이콘, 편집 중에는 카드 자체를 손잡이로 사용 */
.work-major-tools-reorder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c5c9ce;
}
.work-major-tools-reorder-btn svg {
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.work-major-tools-reorder-btn:hover,
.work-major-tools-reorder-btn:focus-visible {
  background: #f1f3f5;
  color: #adb5bd;
}
.work-major-tools-list.is-reordering .work-major-tool-move-btns {
  display: none !important;
}
.work-major-tools-list.is-reordering .work-major-tool-btn {
  padding-right: 12px;
  cursor: grab;
  user-select: none;
}
.work-major-tools-list.is-reordering .work-major-tool-btn:active {
  cursor: grabbing;
}

#view-school-photo-upload #school-photo-meal-feed-result.is-success {
  background: #fff3bf;
  color: #8a5a00;
}


/* 누티스쿨형 급식 계약 내역 학교 표시 */
.sbc-school-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sbc-school-summary[hidden],
.sbc-my-school-row[hidden] {
  display: none !important;
}

.sbc-school-summary strong {
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.sbc-school-summary .sbc-btn {
  flex: 0 0 auto;
}

@media (min-width: 769px) {
  .sbc-panel {
    padding: 28px;
  }
}

@media (max-width: 768px) {
  .sbc-panel {
    padding: 18px 16px;
  }

  .sbc-school-summary {
    gap: 12px;
  }

  .sbc-school-summary strong {
    font-size: 15px;
  }

  .sbc-my-school-input-group {
    flex-wrap: wrap;
  }

  .sbc-my-school-input-group input {
    flex-basis: 100%;
  }

  .sbc-my-school-input-group .sbc-btn {
    flex: 1;
  }
}


/* 제품조회 열 너비 v2: 브랜드·품명 축소, kg단가까지 한 화면 표시 */
@media (min-width: 769px) {
  .main-container:has(#view-product-search.active) {
    max-width: 1250px;
  }
  #view-product-search .product-lookup-table-wrap {
    width: 100%;
    overflow-x: hidden;
  }
  #view-product-search .board-table.product-lookup-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  #view-product-search .board-table.product-lookup-table th,
  #view-product-search .board-table.product-lookup-table td {
    padding-left: 3px;
    padding-right: 3px;
  }
  #view-product-search .board-table.product-lookup-table th:nth-child(3),
  #view-product-search .board-table.product-lookup-table td:nth-child(3) { width: 7.7%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(4),
  #view-product-search .board-table.product-lookup-table td:nth-child(4) { width: 12%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(5),
  #view-product-search .board-table.product-lookup-table td:nth-child(5) { width: 6%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(6),
  #view-product-search .board-table.product-lookup-table td:nth-child(6) { width: 22%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(7),
  #view-product-search .board-table.product-lookup-table td:nth-child(7) { width: 8%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(8),
  #view-product-search .board-table.product-lookup-table td:nth-child(8),
  #view-product-search .board-table.product-lookup-table th:nth-child(9),
  #view-product-search .board-table.product-lookup-table td:nth-child(9) { width: 9%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(10),
  #view-product-search .board-table.product-lookup-table td:nth-child(10) { width: 8%; }
  #view-product-search .board-table.product-lookup-table th:nth-child(11),
  #view-product-search .board-table.product-lookup-table td:nth-child(11) {
    width: 10%;
    min-width: 0;
    white-space: nowrap;
  }
}


/* 홈 왼쪽: 최신 식재료 조회 */
.home-ingredient-preview-card {
  margin-top: 6px;
  padding: 0 16px 14px;
  border: 1px solid #e1e5df;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(30, 48, 37, 0.02);
  overflow: hidden;
}
.home-ingredient-preview-head {
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #edf0ec;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #222;
  cursor: pointer;
  text-align: left;
}
.home-ingredient-preview-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
}
.home-ingredient-preview-heading svg {
  width: 21px;
  height: 21px;
  color: #5b9a45;
  stroke-width: 2.4;
  flex: 0 0 auto;
}
.home-ingredient-preview-more {
  color: #9ba39d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.home-ingredient-preview-list {
  display: block;
}
.home-ingredient-preview-item {
  width: 100%;
  padding: 11px 1px 10px;
  border: 0;
  border-bottom: 1px solid #f0f2ef;
  background: transparent;
  display: block;
  text-align: left;
  cursor: pointer;
}
.home-ingredient-preview-item:last-child {
  border-bottom: 0;
}
.home-ingredient-preview-item:hover,
.home-ingredient-preview-item:focus-visible {
  background: #f8fbf6;
  outline: none;
}
.home-ingredient-preview-name,
.home-ingredient-preview-brand,
.home-ingredient-preview-desc {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-ingredient-preview-name {
  color: #2d312e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}
.home-ingredient-preview-brand {
  margin-top: 2px;
  color: #6d9362;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.home-ingredient-preview-desc {
  margin-top: 2px;
  color: #929994;
  font-size: 11px;
  line-height: 1.4;
}
.home-ingredient-preview-state {
  margin: 0;
  padding: 24px 4px;
  color: #929994;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.home-ingredient-preview-all {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid #dfe4df;
  border-radius: 10px;
  background: #fafbfa;
  color: #424843;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.home-ingredient-preview-all:hover,
.home-ingredient-preview-all:focus-visible {
  border-color: #9fc78f;
  background: #f4f9f1;
  color: #47783a;
  outline: none;
}
@media (max-width: 1024px) {
  .home-ingredient-preview-card {
    display: none;
  }
}


/* 식재료조회: 업체 단가표 등록 지원 */
.product-registration-help-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
  padding: 20px 22px;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  background: #fff;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.product-registration-help-lead {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.product-registration-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
}

.product-registration-help-icon svg {
  width: 20px;
  height: 20px;
}

.product-registration-help-copy {
  min-width: 0;
}

.product-registration-help-copy > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
  line-height: 1.35;
  color: #111827;
}

.product-registration-help-copy p {
  margin: 3px 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6b7280;
  word-break: keep-all;
}

.product-registration-help-copy p b,
.product-registration-help-copy span b {
  color: var(--text-main);
}

.product-registration-help-copy > span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.product-registration-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 9px 17px;
  border-radius: 10px;
  background: var(--secondary-color);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(74, 112, 42, 0.16);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.product-registration-email-btn:hover {
  background: var(--secondary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(74, 112, 42, 0.21);
}

.product-registration-email-btn i,
.product-registration-email-btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.product-registration-email-btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-registration-email-btn small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .product-registration-help-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 18px 16px;
  }

  .product-registration-help-copy > strong {
    font-size: 16px;
  }

  .product-registration-help-copy p {
    font-size: 13px;
  }

  .product-registration-email-btn {
    width: 100%;
  }
}


/* 식재료 조회 상품 등록 문의 채널 */
.product-registration-contact-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.product-registration-contact-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.product-registration-email-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.product-registration-email-link::after {
  content: "›";
  color: #9ca3af;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.product-registration-email-link:hover,
.product-registration-email-link:focus-visible {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.product-registration-help-meta {
  font-size: 12.5px;
  color: #9ca3af;
}

.product-registration-help-copy em {
  font-size: 12.5px;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .product-registration-contact-actions,
  .product-registration-contact-row {
    width: 100%;
    align-items: stretch;
  }

  .product-registration-contact-row {
    flex-direction: column;
    gap: 9px;
  }

  .product-registration-email-link,
  .product-registration-help-meta {
    text-align: center;
  }
}


/* 모바일 식재료조회: 검색창 잘림 방지 + 하단 상품등록 문의 */
.product-registration-mobile-inquiry {
  display: none;
}

@media (max-width: 768px) {
  #view-product-search,
  #view-product-search .vendor-hub-toolbar,
  #view-product-search .vendor-hub-tools,
  #view-product-search .product-lookup-search,
  #view-product-search .product-lookup-search .search-input-wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #view-product-search .vendor-hub-tools {
    flex: 1 1 0;
    overflow: hidden;
  }

  #view-product-search .product-lookup-search {
    flex: 1 1 0;
    width: 100% !important;
  }

  #view-product-search .product-lookup-search input {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-overflow: ellipsis;
  }

  #view-product-search .product-registration-help-banner {
    display: none !important;
  }

  #view-product-search .product-lookup-footer {
    display: none !important;
  }


  #view-product-search .product-registration-mobile-inquiry {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 14px 0 4px auto;
    padding: 8px 13px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #d8e4d0;
    border-radius: 999px;
    background: #fff;
    color: #41652b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(34, 34, 34, 0.07);
  }

  #view-product-search .product-registration-mobile-inquiry:hover,
  #view-product-search .product-registration-mobile-inquiry:focus-visible {
    background: #f7fbf2;
    border-color: #9fc78f;
  }

  #view-product-search .product-registration-mobile-inquiry svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
  }
}


/* 식재료조회: 상품 목록 아래 등록 안내 및 보조 버튼 강조 완화 */
#view-product-search .product-registration-help-banner {
  margin: 18px 0 0;
}

.product-registration-contact-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#view-product-search .product-registration-email-btn {
  min-height: 34px;
  padding: 6px 12px;
  gap: 6px;
  border: 1px solid #cfe1c3;
  background: #e5f1dc;
  color: #41652b;
  font-size: 12px;
  box-shadow: 0 2px 7px rgba(74, 112, 42, 0.09);
}

#view-product-search .product-registration-email-btn:hover,
#view-product-search .product-registration-email-btn:focus-visible {
  border-color: #bdd5ad;
  background: #dcebcf;
  color: #365724;
  box-shadow: 0 3px 8px rgba(74, 112, 42, 0.12);
}

#view-product-search .product-registration-email-btn i,
#view-product-search .product-registration-email-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .product-registration-contact-meta-row {
    width: 100%;
    justify-content: center;
  }
}

/* 모바일 급식피드 댓글 바텀시트 */
@media (max-width: 768px) {
  body.mobile-meal-feed-comments-open { overflow: hidden; }

  #view-meal-feed .meal-feed-comment-stat {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  #view-meal-feed .mobile-meal-feed-comment-form { display: none !important; }

  .mobile-meal-feed-comment-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
  }

  .mobile-meal-feed-comment-sheet[hidden] { display: none !important; }

  .mobile-meal-feed-comment-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
  }

  .mobile-meal-feed-comment-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-height: min(72dvh, 680px);
    min-height: 46dvh;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--bg-card, #fff);
    color: var(--text-main, #222);
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.24);
  }

  .mobile-meal-feed-comment-sheet-handle {
    width: 44px;
    height: 4px;
    margin: 9px auto 5px;
    border-radius: 999px;
    background: var(--border-color, #ced4da);
  }

  .mobile-meal-feed-comment-sheet-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-meal-feed-comment-sheet-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
  }

  .mobile-meal-feed-comment-sheet-close {
    position: absolute;
    right: -4px;
    top: 50%;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 28px;
    line-height: 1;
    transform: translateY(-50%);
  }

  .mobile-meal-feed-comment-sheet-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-meal-feed-comment-sheet-item {
    display: flex;
    gap: 10px;
    padding: 9px 2px;
  }

  .mobile-meal-feed-comment-sheet-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #343d48;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-meal-feed-comment-sheet-copy {
    min-width: 0;
    padding-top: 1px;
  }

  .mobile-meal-feed-comment-sheet-copy strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
  }

  .mobile-meal-feed-comment-sheet-copy p {
    margin: 0;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .mobile-meal-feed-comment-sheet-empty {
    margin: auto;
    padding: 28px 8px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
  }

  .mobile-meal-feed-comment-sheet-empty[hidden] { display: none !important; }

  .mobile-meal-feed-comment-sheet-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 0 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
  }

  .mobile-meal-feed-comment-sheet-form .mobile-meal-feed-comment-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    max-height: 92px;
    padding: 8px 12px;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    line-height: 20px;
  }

  .mobile-meal-feed-comment-sheet-form .mobile-meal-feed-comment-submit {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: var(--secondary-color);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
  }

  html[data-nutie-theme-resolved="dark"] .mobile-meal-feed-comment-sheet-panel,
  html[data-nutie-theme-resolved="dark"] .mobile-meal-feed-comment-sheet-form {
    background: #11161d;
    border-color: #29313a;
  }

  html[data-nutie-theme-resolved="dark"] .mobile-meal-feed-comment-sheet-form .mobile-meal-feed-comment-input {
    background: #171d25 !important;
    border-color: #343d48 !important;
    color: #f5f7fa !important;
  }
}


/* Desktop quick rail: compact icon-only layout (비커뮤니티 화면 전용) */
@media (min-width: 769px) {
  body:not(.is-community-view) {
    padding-left: 112px;
  }

  body:not(.is-community-view) .desktop-app-rail,
  body:not(.is-community-view) .desktop-app-rail:hover,
  body:not(.is-community-view) .desktop-app-rail:focus-within {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    grid-auto-rows: 56px;
    align-content: start;
    align-items: center;
    gap: 8px 4px;
    width: 112px;
    height: 100vh;
    padding: 88px 10px 24px;
    overflow: hidden;
    box-shadow: none;
    transition: none;
  }

  body:not(.is-community-view) .desktop-rail-item {
    position: relative;
    width: 44px;
    min-height: 56px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  body:not(.is-community-view) .desktop-rail-item[hidden] {
    display: none;
  }

  body:not(.is-community-view) .desktop-rail-item svg,
  body:not(.is-community-view) .desktop-rail-item i {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  body:not(.is-community-view) .desktop-rail-item span:not([data-unread-badge]) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    transform: none;
  }

  body:not(.is-community-view) .desktop-rail-item .header-unread-badge--inline {
    position: absolute;
    top: 7px;
    right: 4px;
    margin: 0;
  }
}

/* 2026-09-29 오늘 할일 허브: 업무 행을 한 줄의 촘촘한 형태로 표시 */
.work-check-card--today,
.work-check-card--month {
  padding-left: 18px;
  padding-right: 18px;
}

.work-check-card--today .work-check-card-head,
.work-check-card--month .work-check-card-head {
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
}

.work-check-card--today .work-check-list,
.work-check-month-col .work-check-list {
  gap: 3px;
  padding-right: 2px;
  padding-bottom: 8px;
}

.work-check-item {
  min-height: 32px;
  padding: 5px 0;
}

.work-check-check {
  gap: 5px;
}

.work-check-item-main {
  min-width: 0;
  overflow: hidden;
}

.work-check-item-title {
  display: block;
  min-width: 0;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 769px) {
  .work-check-layout:not(.is-custom) .work-check-month-col .work-check-list {
    height: calc((32px * 8) + (3px * 7) + 8px);
    min-height: calc((32px * 8) + (3px * 7) + 8px);
    max-height: calc((32px * 8) + (3px * 7) + 8px);
  }
}


/* Meal contract loading indicator */
.sbc-loading{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#7b8794;text-align:center}.sbc-loading-spinner{width:22px;height:22px;border:3px solid #e6e9ed;border-top-color:#12b886;border-radius:50%;animation:sbc-loading-spin .8s linear infinite}.sbc-loading-text{font-size:13px;font-weight:500}@keyframes sbc-loading-spin{to{transform:rotate(360deg)}}

/* PC 커뮤니티 카드 너비는 community-feed-v2.css의 820px 피드 컨테이너를 따릅니다. */
