/* Mobile color mode: system / light / dark */
.nutie-theme-setting-row,
.nutie-theme-picker { display: none; }

@media (max-width: 768px) {
  .nutie-theme-setting-row {
    width: 100%;
    min-height: 64px;
    margin: 14px 0;
    padding: 12px 4px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    text-align: left;
  }
  .nutie-theme-setting-copy { display: grid; gap: 3px; }
  .nutie-theme-setting-title { font-size: 15px; font-weight: 700; }
  .nutie-theme-setting-value { color: var(--text-muted); font-size: 13px; }
  .nutie-theme-setting-arrow { color: var(--text-muted); font-size: 28px; font-weight: 300; }
  .nutie-theme-picker[hidden] { display: none !important; }
  .nutie-theme-picker { position: fixed; inset: 0; z-index: 2147483646; display: block; }
  .nutie-theme-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.58); }
  .nutie-theme-picker-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 -10px 35px rgba(0,0,0,.2);
  }
  .nutie-theme-picker-head { display: flex; align-items: center; justify-content: space-between; }
  .nutie-theme-picker-head h2 { margin: 0; font-size: 20px; }
  .nutie-theme-picker-close { color: var(--text-main); font-size: 30px; line-height: 1; padding: 4px 6px; }
  .nutie-theme-picker-guide { margin: 4px 0 16px; color: var(--text-muted); font-size: 13px; }
  .nutie-theme-options { display: grid; gap: 8px; }
  [data-nutie-theme-choice] {
    min-height: 66px; width: 100%; padding: 10px 12px;
    border: 1px solid var(--border-color); border-radius: 14px;
    display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 8px;
    background: var(--bg-card); color: var(--text-main); text-align: left;
  }
  [data-nutie-theme-choice] strong, [data-nutie-theme-choice] small { display: block; }
  [data-nutie-theme-choice] strong { font-size: 15px; }
  [data-nutie-theme-choice] small { margin-top: 2px; color: var(--text-muted); font-size: 12px; }
  .nutie-theme-option-icon { font-size: 22px; text-align: center; }
  .nutie-theme-check { color: var(--secondary-color); font-size: 20px; opacity: 0; }
  [data-nutie-theme-choice].is-selected { border-color: var(--secondary-color); background: color-mix(in srgb, var(--secondary-color) 10%, var(--bg-card)); }
  [data-nutie-theme-choice].is-selected .nutie-theme-check { opacity: 1; }
  body.nutie-theme-picker-open { overflow: hidden; }

  html[data-nutie-theme-resolved="dark"] {
    --bg-page: #0b0f14;
    --bg-card: #11161d;
    --border-color: #29313a;
    --text-main: #f5f7fa;
    --text-sub: #d5dbe2;
    --text-muted: #929ba6;
    --secondary-color: #45d6a5;
    --secondary-hover: #5ce2b4;
    color-scheme: dark;
  }
  html[data-nutie-theme-resolved="dark"] body,
  html[data-nutie-theme-resolved="dark"] main,
  html[data-nutie-theme-resolved="dark"] .main-content,
  html[data-nutie-theme-resolved="dark"] .tab-view { background-color: var(--bg-page); color: var(--text-main); }
  html[data-nutie-theme-resolved="dark"] #main-header,
  html[data-nutie-theme-resolved="dark"] .top-bar,
  html[data-nutie-theme-resolved="dark"] .mobile-bottom-nav,
  html[data-nutie-theme-resolved="dark"] .mobile-sub-nav,
  html[data-nutie-theme-resolved="dark"] .mobile-user-menu,
  html[data-nutie-theme-resolved="dark"] .user-dropdown-menu,
  html[data-nutie-theme-resolved="dark"] .modal-content,
  html[data-nutie-theme-resolved="dark"] .modal-card,
  html[data-nutie-theme-resolved="dark"] .modal-body,
  html[data-nutie-theme-resolved="dark"] [role="dialog"],
  html[data-nutie-theme-resolved="dark"] .post-card,
  html[data-nutie-theme-resolved="dark"] .feed-card,
  html[data-nutie-theme-resolved="dark"] .meal-feed-card,
  html[data-nutie-theme-resolved="dark"] .board-card,
  html[data-nutie-theme-resolved="dark"] .comment-item,
  html[data-nutie-theme-resolved="dark"] .search-box,
  html[data-nutie-theme-resolved="dark"] .write-form {
    background-color: var(--bg-card) !important;
    color: var(--text-main);
    border-color: var(--border-color) !important;
  }
  html[data-nutie-theme-resolved="dark"] input,
  html[data-nutie-theme-resolved="dark"] select,
  html[data-nutie-theme-resolved="dark"] textarea {
    background-color: #171d25 !important;
    color: var(--text-main) !important;
    border-color: #343d48 !important;
  }
  html[data-nutie-theme-resolved="dark"] input::placeholder,
  html[data-nutie-theme-resolved="dark"] textarea::placeholder { color: #7f8995; }
  html[data-nutie-theme-resolved="dark"] button,
  html[data-nutie-theme-resolved="dark"] a { color: inherit; }
  html[data-nutie-theme-resolved="dark"] svg:not([data-keep-color]) { color: currentColor; }
  html[data-nutie-theme-resolved="dark"] hr,
  html[data-nutie-theme-resolved="dark"] table,
  html[data-nutie-theme-resolved="dark"] th,
  html[data-nutie-theme-resolved="dark"] td { border-color: var(--border-color) !important; }
  html[data-nutie-theme-resolved="dark"] th { background: #171d25 !important; color: var(--text-sub); }
  html[data-nutie-theme-resolved="dark"] td { background: var(--bg-card); color: var(--text-main); }
  html[data-nutie-theme-resolved="dark"] .mobile-bottom-nav { box-shadow: 0 -1px 0 var(--border-color); }
  html[data-nutie-theme-resolved="dark"] .mobile-bottom-nav .active,
  html[data-nutie-theme-resolved="dark"] .mobile-sub-tab-btn.active,
  html[data-nutie-theme-resolved="dark"] .mobile-bottom-nav-btn.active { color: var(--secondary-color); }
  html[data-nutie-theme-resolved="dark"] img,
  html[data-nutie-theme-resolved="dark"] video { color-scheme: only light; }
}

/* 다크모드 가독성 보정: 식재료 조회 · 커뮤니티 · 검색 · 상세 본문 */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] .search-input-wrapper,
  html[data-nutie-theme-resolved="dark"] .mobile-search-wrapper,
  html[data-nutie-theme-resolved="dark"] .mobile-search-bar { background-color: #171d25 !important; border-color: #343d48 !important; box-shadow: none !important; }
  html[data-nutie-theme-resolved="dark"] .search-input-wrapper:focus-within,
  html[data-nutie-theme-resolved="dark"] .mobile-search-wrapper:focus-within { background-color: #171d25 !important; border-color: var(--secondary-color) !important; }
  html[data-nutie-theme-resolved="dark"] .search-input-wrapper::before,
  html[data-nutie-theme-resolved="dark"] .search-input-wrapper::after,
  html[data-nutie-theme-resolved="dark"] .mobile-search-wrapper::before,
  html[data-nutie-theme-resolved="dark"] .mobile-search-wrapper::after { background-color: #171d25 !important; }
  html[data-nutie-theme-resolved="dark"] .search-input-wrapper .search-icon,
  html[data-nutie-theme-resolved="dark"] .mobile-search-icon { color: #929ba6 !important; }
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card:hover { background-color: #11161d !important; border-color: #29313a !important; color: #f5f7fa !important; }
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-name { color: #f5f7fa !important; }
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-brand,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-meta,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-desc { color: #cbd3dc !important; }
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-thumb,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-card-thumb-wrap { background-color: #171d25 !important; border-color: #343d48 !important; }
  html[data-nutie-theme-resolved="dark"] #view-meal-feed .mobile-meal-feed-head { background-color: #11161d !important; }
  html[data-nutie-theme-resolved="dark"] #view-channels .view-title,
  html[data-nutie-theme-resolved="dark"] #view-channels .community-filter-posts-title,
  html[data-nutie-theme-resolved="dark"] #view-channels .post-title,
  html[data-nutie-theme-resolved="dark"] #view-channels .board-post-title,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .view-title,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .post-title,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .board-post-title { color: #f7f9fb !important; }
  html[data-nutie-theme-resolved="dark"] #view-channels .post-content,
  html[data-nutie-theme-resolved="dark"] #view-channels .board-post-excerpt,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .post-content,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .board-post-excerpt { color: #d5dbe2 !important; }
  html[data-nutie-theme-resolved="dark"] #view-channels .feed-post-card:hover,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .feed-post-card:hover { background-color: #151b22 !important; border-color: #29313a !important; }
  html[data-nutie-theme-resolved="dark"] #view-post-detail .post-detail-card,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-header,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comments-section,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comment-item { background-color: #11161d !important; border-color: #29313a !important; color: #f5f7fa !important; }
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-content,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-content * { background-color: transparent !important; color: #e7ecf2 !important; }
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-content a { color: #78b7ff !important; }
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comment-text,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comment-author,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comments-heading { color: #eef2f6 !important; }
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comment-input-wrap,
  html[data-nutie-theme-resolved="dark"] #view-post-detail .detail-comment-form { background-color: #171d25 !important; border-color: #343d48 !important; }
}


/* Web meal-contract hierarchy: compact details, one-point-larger title, green contract amount. */
@media (min-width: 769px) {
  .sbc-table tbody td {
    font-size: 12px;
    font-weight: 400;
  }

  .sbc-table tbody .sbc-table-title,
  .sbc-table tbody .sbc-title-link {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
  }

  .sbc-table tbody .sbc-table-amount {
    color: #111827;
    font-weight: 400;
  }

  .sbc-table tbody .sbc-table-contract-amount,
  .sbc-table tbody td:nth-child(6) {
    color: #059669;
    font-weight: 700;
  }
}

/* 모바일 다크모드 누락 영역 보정: 푸터 · 정렬/문의 · 공유 · 홈 목록 */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] .footer,
  html[data-nutie-theme-resolved="dark"] .footer-container {
    background-color: #0b0f14 !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .footer-logo {
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .footer-links a,
  html[data-nutie-theme-resolved="dark"] .footer-copyright {
    color: #aeb7c2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-sort-btn {
    background-color: #202733 !important;
    border-color: #3b4653 !important;
    color: #e7ecf2 !important;
    box-shadow: none !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-sort-btn:hover,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-sort-btn:focus-visible,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-lookup-sort-btn.is-active {
    background-color: #2b3542 !important;
    border-color: #45d6a5 !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-product-search .product-registration-mobile-inquiry {
    background-color: #202733 !important;
    border-color: #3b4653 !important;
    color: #dce3ea !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28) !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-product-search .product-registration-mobile-inquiry:hover,
  html[data-nutie-theme-resolved="dark"] #view-product-search .product-registration-mobile-inquiry:focus-visible {
    background-color: #2b3542 !important;
    border-color: #566474 !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-share-fab,
  html[data-nutie-theme-resolved="dark"] .home-share-fab:hover,
  html[data-nutie-theme-resolved="dark"] .home-share-fab:focus-visible {
    background-color: #202733 !important;
    border-color: #3b4653 !important;
    color: #e7ecf2 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34) !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-field-card,
  html[data-nutie-theme-resolved="dark"] .home-field-card-body,
  html[data-nutie-theme-resolved="dark"] .home-feed .feed-post-card.home-feed-compact,
  html[data-nutie-theme-resolved="dark"] #home-feed-list .feed-post-card {
    background-color: #11161d !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-field-card .home-field-card-head {
    background-color: #1b222c !important;
    border-color: #29313a !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-field-card-title,
  html[data-nutie-theme-resolved="dark"] .home-field-card-post,
  html[data-nutie-theme-resolved="dark"] .home-feed .home-feed-compact .post-title {
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-field-card-more,
  html[data-nutie-theme-resolved="dark"] .home-field-card-date,
  html[data-nutie-theme-resolved="dark"] .home-feed .home-feed-compact .post-date {
    color: #aeb7c2 !important;
  }

  html[data-nutie-theme-resolved="dark"] .home-field-card-item,
  html[data-nutie-theme-resolved="dark"] .home-feed .feed-list {
    border-color: #29313a !important;
  }
}



/* Dark mode: AI work tools match the home screen card surfaces. */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .view-title {
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .view-subtitle {
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-major-tool-btn {
    background: #1b222c !important;
    border-color: #303946 !important;
    box-shadow: none !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-major-tool-btn:hover,
  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-major-tool-btn:focus-visible {
    background: #202936 !important;
    border-color: #3b4654 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-major-tool-desc {
    color: #b8c1cc !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-major-tool-chevron {
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-tool-suggestion-card {
    background: #11161d !important;
    border-color: #303946 !important;
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-tool-suggestion-title {
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools .work-tool-suggestion-cta {
    color: #69d9b4 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-ai-work-tools ~ .home-share-fab,
  html[data-nutie-theme-resolved="dark"] body:has(#view-ai-work-tools.active) .home-share-fab {
    background: #1b222c !important;
    border-color: #3b4654 !important;
    color: #f5f7fa !important;
  }
}


/* Dark mode: remaining home and community surfaces. */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] #view-channels .community-list-more-btn,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .community-list-more-btn {
    background: #1b222c !important;
    border-color: #343d48 !important;
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-channels .community-list-more-btn:hover,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .community-list-more-btn:hover {
    background: #202936 !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-channels .feed-empty-message,
  html[data-nutie-theme-resolved="dark"] #view-channel-board .feed-empty-message,
  html[data-nutie-theme-resolved="dark"] #community-filter-posts-list > .feed-empty-message,
  html[data-nutie-theme-resolved="dark"] #community-channel-board-list > .feed-empty-message {
    background: #11161d !important;
    border-color: #29313a !important;
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .widget-card,
  html[data-nutie-theme-resolved="dark"] #view-home .home-login-cta,
  html[data-nutie-theme-resolved="dark"] #view-home .work-shortcuts-card,
  html[data-nutie-theme-resolved="dark"] #view-home .work-major-tools-card {
    background: #11161d !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .home-login-cta-title,
  html[data-nutie-theme-resolved="dark"] #view-home .widget-card h3,
  html[data-nutie-theme-resolved="dark"] #view-home .work-shortcuts-header h2,
  html[data-nutie-theme-resolved="dark"] #view-home .work-major-tools-title {
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .home-login-cta-signup {
    background: #1b222c !important;
    border-color: #4a5563 !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .home-login-cta-signup:hover {
    background: #202936 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .popular-keywords-list li {
    border-color: #29313a !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .popular-keywords-list .keyword {
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .popular-keywords-list .rank,
  html[data-nutie-theme-resolved="dark"] #view-home .popular-keywords-empty {
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-shortcut-link:hover {
    background: #202936 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-shortcut-icon {
    background: #1b222c !important;
    border-color: #343d48 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-major-tool-btn {
    background: #1b222c !important;
    border-color: #303946 !important;
    box-shadow: none !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-major-tool-desc {
    color: #b8c1cc !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-tool-suggestion-card {
    background: #171d25 !important;
    border-color: #303946 !important;
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-tool-suggestion-title {
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-home .work-tool-suggestion-cta {
    color: #69d9b4 !important;
  }
}


/* Dark mode: mobile menu, profile and messages. */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] .sidebar,
  html[data-nutie-theme-resolved="dark"] .sidebar-header,
  html[data-nutie-theme-resolved="dark"] .sidebar-nav,
  html[data-nutie-theme-resolved="dark"] .mobile-auth,
  html[data-nutie-theme-resolved="dark"] .mobile-user-profile,
  html[data-nutie-theme-resolved="dark"] .mobile-user-menu-links {
    background: #11161d !important;
    color: #f5f7fa !important;
    border-color: #29313a !important;
  }

  html[data-nutie-theme-resolved="dark"] .mobile-menu-link {
    background: #171d25 !important;
    border-color: #29313a !important;
    color: #e7ebef !important;
  }

  html[data-nutie-theme-resolved="dark"] .mobile-menu-link:hover,
  html[data-nutie-theme-resolved="dark"] .mobile-menu-link:focus-visible {
    background: #202936 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-info .widget-card,
  html[data-nutie-theme-resolved="dark"] #view-my-info .my-profile-card,
  html[data-nutie-theme-resolved="dark"] #view-my-info .my-nickname-card,
  html[data-nutie-theme-resolved="dark"] #view-my-info .my-profile-list,
  html[data-nutie-theme-resolved="dark"] #view-my-info form {
    background: #11161d !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-info h2,
  html[data-nutie-theme-resolved="dark"] #view-my-info h3,
  html[data-nutie-theme-resolved="dark"] #view-my-info dt,
  html[data-nutie-theme-resolved="dark"] #view-my-info dd,
  html[data-nutie-theme-resolved="dark"] #view-my-info label {
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-info .view-subtitle,
  html[data-nutie-theme-resolved="dark"] #view-my-info .my-nickname-help,
  html[data-nutie-theme-resolved="dark"] #view-my-info .my-profile-empty {
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-box-tabs,
  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-list,
  html[data-nutie-theme-resolved="dark"] #view-my-messages .message-item,
  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-item {
    background: #11161d !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-box-tab {
    background: #171d25 !important;
    border-color: #343d48 !important;
    color: #b8c1cc !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-box-tab.active {
    background: #26313d !important;
    color: #f5f7fa !important;
    border-color: #45d6a5 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-my-messages .messages-empty {
    background: #11161d !important;
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] .dm-messenger-panel,
  html[data-nutie-theme-resolved="dark"] .dm-pane,
  html[data-nutie-theme-resolved="dark"] .dm-pane-head,
  html[data-nutie-theme-resolved="dark"] .dm-box-tabs,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-list,
  html[data-nutie-theme-resolved="dark"] .dm-thread-messages,
  html[data-nutie-theme-resolved="dark"] .dm-compose {
    background: #11161d !important;
    border-color: #29313a !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .dm-box-tab,
  html[data-nutie-theme-resolved="dark"] .dm-icon-btn,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-item {
    background: #171d25 !important;
    border-color: #29313a !important;
    color: #d5dbe2 !important;
  }

  html[data-nutie-theme-resolved="dark"] .dm-box-tab.active,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-item:hover,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-item.is-active {
    background: #202936 !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .dm-conversation-preview,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-time,
  html[data-nutie-theme-resolved="dark"] .dm-bubble-meta,
  html[data-nutie-theme-resolved="dark"] .dm-conversation-empty,
  html[data-nutie-theme-resolved="dark"] .dm-thread-empty {
    color: #929ba6 !important;
  }

  html[data-nutie-theme-resolved="dark"] .dm-bubble {
    background: #202936 !important;
    color: #f5f7fa !important;
  }
}

/* 모바일 다크모드 댓글 액션 + 식재료 검색 너비 보정 */
@media (max-width: 768px) {
  html[data-nutie-theme-resolved="dark"] .detail-comment-like-btn,
  html[data-nutie-theme-resolved="dark"] .detail-comment-reply-btn,
  html[data-nutie-theme-resolved="dark"] .detail-comment-edit-cancel,
  html[data-nutie-theme-resolved="dark"] .detail-comment-reply-cancel {
    background-color: #202733 !important;
    border-color: #3b4653 !important;
    color: #c9d1da !important;
  }

  html[data-nutie-theme-resolved="dark"] .detail-comment-like-btn:hover,
  html[data-nutie-theme-resolved="dark"] .detail-comment-like-btn:focus-visible,
  html[data-nutie-theme-resolved="dark"] .detail-comment-reply-btn:hover,
  html[data-nutie-theme-resolved="dark"] .detail-comment-reply-btn:focus-visible,
  html[data-nutie-theme-resolved="dark"] .detail-comment-edit-cancel:hover,
  html[data-nutie-theme-resolved="dark"] .detail-comment-reply-cancel:hover {
    background-color: #2b3542 !important;
    color: #f5f7fa !important;
  }

  html[data-nutie-theme-resolved="dark"] .detail-comment-like-btn.liked {
    background-color: #342126 !important;
    border-color: #6b3540 !important;
    color: #ff6675 !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-meal-feed .meal-feed-like-btn,
  html[data-nutie-theme-resolved="dark"] #view-meal-feed .meal-feed-comment-stat {
    color: #c9d1da !important;
  }

  html[data-nutie-theme-resolved="dark"] #view-meal-feed .meal-feed-like-btn.liked {
    color: #ff6675 !important;
  }

  #view-product-search .vendor-hub-list-head {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #view-product-search .vendor-hub-list-head .product-lookup-search,
  #view-product-search .product-lookup-search {
    position: static !important;
    left: auto !important;
    right: auto !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    transform: none !important;
    box-sizing: border-box;
  }

  #view-product-search .product-lookup-search .search-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  #view-product-search .product-lookup-search input {
    min-width: 0 !important;
  }

  #view-product-search .vendor-hub-list-head .write-btn,
  #view-product-search .vendor-hub-list-head .product-register-btn {
    flex: 0 0 auto;
  }
}



/* PC 급식 계약 목록: 8개 열을 분명하게 나누고 제목·계약금액만 강조한다. */
@media (min-width: 1024px) {
  #sbc-list-panel .sbc-table-wrap:not([hidden]) {
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #fff;
  }

  #sbc-list-panel .sbc-table {
    min-width: 1080px;
    table-layout: fixed;
  }

  #sbc-list-panel .sbc-table th,
  #sbc-list-panel .sbc-table td {
    padding: 14px 12px;
    border-right: 1px solid #edf0f3;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
  }

  #sbc-list-panel .sbc-table th {
    background: #f7f8fa;
    color: #374151;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
  }

  #sbc-list-panel .sbc-table th:last-child,
  #sbc-list-panel .sbc-table td:last-child {
    border-right: 0;
  }

  #sbc-list-panel .sbc-table tbody tr:last-child td {
    border-bottom: 0;
  }

  #sbc-list-panel .sbc-table th:nth-child(1),
  #sbc-list-panel .sbc-table td:nth-child(1) { width: 11%; }
  #sbc-list-panel .sbc-table th:nth-child(2),
  #sbc-list-panel .sbc-table td:nth-child(2) { width: 10%; }
  #sbc-list-panel .sbc-table th:nth-child(3),
  #sbc-list-panel .sbc-table td:nth-child(3) { width: 25%; }
  #sbc-list-panel .sbc-table th:nth-child(4),
  #sbc-list-panel .sbc-table td:nth-child(4) { width: 14%; }
  #sbc-list-panel .sbc-table th:nth-child(5),
  #sbc-list-panel .sbc-table td:nth-child(5) { width: 12%; }
  #sbc-list-panel .sbc-table th:nth-child(6),
  #sbc-list-panel .sbc-table td:nth-child(6) { width: 12%; }
  #sbc-list-panel .sbc-table th:nth-child(7),
  #sbc-list-panel .sbc-table td:nth-child(7) { width: 9%; }
  #sbc-list-panel .sbc-table th:nth-child(8),
  #sbc-list-panel .sbc-table td:nth-child(8) { width: 7%; }

  #sbc-list-panel .sbc-table td:nth-child(1),
  #sbc-list-panel .sbc-table td:nth-child(2),
  #sbc-list-panel .sbc-table td:nth-child(4),
  #sbc-list-panel .sbc-table td:nth-child(7),
  #sbc-list-panel .sbc-table td:nth-child(8) {
    text-align: center;
  }

  #sbc-list-panel .sbc-table td:nth-child(3) {
    text-align: left;
  }

  #sbc-list-panel .sbc-table td:nth-child(5),
  #sbc-list-panel .sbc-table td:nth-child(6) {
    text-align: right;
  }

  #sbc-list-panel .sbc-table td:nth-child(4) .sbc-supplier-link {
    display: inline-block;
    width: auto;
    text-align: center;
  }

  #sbc-list-panel .sbc-table tbody .sbc-table-title,
  #sbc-list-panel .sbc-table tbody .sbc-title-link {
    font-size: 13px;
    font-weight: 700;
    text-align: left;
  }

  #sbc-list-panel .sbc-table tbody .sbc-supplier-link,
  #sbc-list-panel .sbc-table tbody .sbc-table-date,
  #sbc-list-panel .sbc-table tbody .sbc-table-deal,
  #sbc-list-panel .sbc-table tbody .sbc-table-status,
  #sbc-list-panel .sbc-table tbody .sbc-table-amount {
    font-weight: 400;
  }

  /* Keep deal method, base price, and award rate neutral in the desktop contract table. */
  #sbc-list-panel .sbc-table tbody td.sbc-table-deal,
  #sbc-list-panel .sbc-table tbody td.sbc-table-amount:not(.sbc-table-contract-amount),
  #sbc-list-panel .sbc-table tbody td.sbc-table-status {
    color: #111827 !important;
    font-weight: 400 !important;
  }

  #sbc-list-panel .sbc-table tbody .sbc-table-contract-amount {
    color: #059669;
    font-weight: 700;
  }

  #sbc-list-panel .sbc-source-icon {
    margin: 0 auto;
  }
}


/* 2026-09-14: complete appearance preferences and dark-mode contrast fixes */
html[data-nutie-font-size="small"] { font-size: 14px; }
html[data-nutie-font-size="medium"] { font-size: 16px; }
html[data-nutie-font-size="large"] { font-size: 18px; }
html[data-nutie-font-size] body,
html[data-nutie-font-size] button,
html[data-nutie-font-size] input,
html[data-nutie-font-size] select,
html[data-nutie-font-size] textarea { font-size: 1rem; }
html[data-nutie-font-size] small,
html[data-nutie-font-size] .meta,
html[data-nutie-font-size] [class*="caption"] { font-size: .8125rem; }

.nutie-font-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.nutie-preference-label { margin: 18px 0 6px; color: var(--text-main); font-size: 14px; font-weight: 700; }
[data-nutie-font-choice] {
  min-height: 44px; padding: 8px; border: 1px solid var(--border-color); border-radius: 12px;
  background: var(--bg-card); color: var(--text-main); font-weight: 700;
}
[data-nutie-font-choice].is-selected {
  border-color: var(--secondary-color);
  background: color-mix(in srgb, var(--secondary-color) 12%, var(--bg-card));
  color: var(--secondary-color);
}

html[data-nutie-theme-resolved="dark"] {
  --nutie-dark-page: #0b0f14;
  --nutie-dark-surface: #11161d;
  --nutie-dark-raised: #171d25;
  --nutie-dark-border: #303944;
  --nutie-dark-text: #f5f7fa;
  --nutie-dark-subtext: #c5cdd6;
  --nutie-dark-muted: #929daa;
}
html[data-nutie-theme-resolved="dark"] .meal-converter-card,
html[data-nutie-theme-resolved="dark"] .meal-converter-upload-card,
html[data-nutie-theme-resolved="dark"] .meal-converter-school-card,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-card,
html[data-nutie-theme-resolved="dark"] .school-photo-form,
html[data-nutie-theme-resolved="dark"] .meal-calc-card,
html[data-nutie-theme-resolved="dark"] .meal-calc-section,
html[data-nutie-theme-resolved="dark"] .work-check-card,
html[data-nutie-theme-resolved="dark"] .work-check-panel,
html[data-nutie-theme-resolved="dark"] .work-check-list,
html[data-nutie-theme-resolved="dark"] .mobile-user-menu,
html[data-nutie-theme-resolved="dark"] .mobile-user-menu > *,
html[data-nutie-theme-resolved="dark"] .mobile-user-profile,
html[data-nutie-theme-resolved="dark"] .mobile-user-menu-links {
  background: var(--nutie-dark-surface) !important;
  color: var(--nutie-dark-text) !important;
  border-color: var(--nutie-dark-border) !important;
}
html[data-nutie-theme-resolved="dark"] .meal-converter-view h1,
html[data-nutie-theme-resolved="dark"] .meal-converter-view h2,
html[data-nutie-theme-resolved="dark"] .meal-converter-view h3,
html[data-nutie-theme-resolved="dark"] .meal-converter-view label,
html[data-nutie-theme-resolved="dark"] .meal-converter-view strong,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view h1,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view h2,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view h3,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view label,
html[data-nutie-theme-resolved="dark"] .meal-calc-card h1,
html[data-nutie-theme-resolved="dark"] .meal-calc-card h2,
html[data-nutie-theme-resolved="dark"] .meal-calc-card h3,
html[data-nutie-theme-resolved="dark"] .meal-calc-card label,
html[data-nutie-theme-resolved="dark"] .work-check-card,
html[data-nutie-theme-resolved="dark"] .work-check-card button {
  color: var(--nutie-dark-text) !important;
}
html[data-nutie-theme-resolved="dark"] .meal-converter-view p,
html[data-nutie-theme-resolved="dark"] .meal-converter-view .hint,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view p,
html[data-nutie-theme-resolved="dark"] .school-photo-upload-view .hint,
html[data-nutie-theme-resolved="dark"] .meal-calc-card p,
html[data-nutie-theme-resolved="dark"] .meal-calc-card .meal-calc-help,
html[data-nutie-theme-resolved="dark"] .work-check-view .view-subtitle {
  color: var(--nutie-dark-subtext) !important;
}
html[data-nutie-theme-resolved="dark"] .meal-converter-dropzone,
html[data-nutie-theme-resolved="dark"] .meal-converter-file-box,
html[data-nutie-theme-resolved="dark"] .school-photo-file-box,
html[data-nutie-theme-resolved="dark"] .work-check-item,
html[data-nutie-theme-resolved="dark"] .meal-calc-result,
html[data-nutie-theme-resolved="dark"] .meal-calc-summary {
  background: var(--nutie-dark-raised) !important;
  color: var(--nutie-dark-text) !important;
  border-color: var(--nutie-dark-border) !important;
}
html[data-nutie-theme-resolved="dark"] .meal-calc-card table,
html[data-nutie-theme-resolved="dark"] .meal-calc-card thead,
html[data-nutie-theme-resolved="dark"] .meal-calc-card tbody,
html[data-nutie-theme-resolved="dark"] .meal-calc-card tr,
html[data-nutie-theme-resolved="dark"] .meal-calc-card th,
html[data-nutie-theme-resolved="dark"] .meal-calc-card td {
  background: var(--nutie-dark-surface) !important;
  color: var(--nutie-dark-text) !important;
  border-color: var(--nutie-dark-border) !important;
}
html[data-nutie-theme-resolved="dark"] .meal-calc-card input,
html[data-nutie-theme-resolved="dark"] .meal-calc-card select {
  background: var(--nutie-dark-raised) !important;
  color: var(--nutie-dark-text) !important;
}
html[data-nutie-theme-resolved="dark"] .pagination button,
html[data-nutie-theme-resolved="dark"] .pagination a,
html[data-nutie-theme-resolved="dark"] .product-pagination button,
html[data-nutie-theme-resolved="dark"] .product-pagination a {
  background: var(--nutie-dark-raised) !important;
  color: var(--nutie-dark-text) !important;
  border-color: var(--nutie-dark-border) !important;
}
html[data-nutie-theme-resolved="dark"] .pagination .active,
html[data-nutie-theme-resolved="dark"] .product-pagination .active {
  background: #ff4f58 !important; color: #fff !important; border-color: #ff4f58 !important;
}
html[data-nutie-theme-resolved="dark"] .mobile-user-menu::before,
html[data-nutie-theme-resolved="dark"] .mobile-user-menu::after { background: var(--nutie-dark-surface) !important; }
html[data-nutie-theme-resolved="dark"] .mobile-menu-link {
  background: var(--nutie-dark-raised) !important;
  color: var(--nutie-dark-text) !important;
  border-color: var(--nutie-dark-border) !important;
}
@media (max-width: 768px) {
  .nutie-theme-setting-row { display: flex; }
  html[data-nutie-font-size="large"] .mobile-bottom-nav { overflow-x: auto; }
  html[data-nutie-font-size="large"] .mobile-bottom-nav button { min-width: 72px; }
}


/* Appearance settings are available from My Info on every screen size. */
@media (min-width: 769px) {
  .nutie-theme-setting-row {
    width: 100%; min-height: 64px; margin: 16px 0; padding: 12px 16px;
    border: 1px solid var(--border-color); border-radius: 14px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card); color: var(--text-main); text-align: left;
  }
  .nutie-theme-setting-copy { display: grid; gap: 3px; }
  .nutie-theme-setting-title { font-size: 15px; font-weight: 700; }
  .nutie-theme-setting-value { color: var(--text-muted); font-size: 13px; }
  .nutie-theme-setting-arrow { color: var(--text-muted); font-size: 28px; }
  .nutie-theme-picker[hidden] { display: none !important; }
  .nutie-theme-picker { position: fixed; inset: 0; z-index: 2147483646; display: grid; place-items: center; padding: 24px; }
  .nutie-theme-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.58); }
  .nutie-theme-picker-sheet {
    position: relative; width: min(460px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
    padding: 24px; border-radius: 20px; background: var(--bg-card); color: var(--text-main);
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
  }
  .nutie-theme-picker-head { display: flex; align-items: center; justify-content: space-between; }
  .nutie-theme-picker-head h2 { margin: 0; font-size: 20px; }
  .nutie-theme-picker-close { color: var(--text-main); font-size: 30px; line-height: 1; padding: 4px 6px; }
  .nutie-theme-picker-guide { margin: 4px 0 16px; color: var(--text-muted); font-size: 13px; }
  .nutie-theme-options { display: grid; gap: 8px; }
  [data-nutie-theme-choice] {
    min-height: 66px; width: 100%; padding: 10px 12px; border: 1px solid var(--border-color);
    border-radius: 14px; display: grid; grid-template-columns: 34px 1fr 24px;
    align-items: center; gap: 8px; background: var(--bg-card); color: var(--text-main); text-align: left;
  }
  [data-nutie-theme-choice] strong, [data-nutie-theme-choice] small { display: block; }
  [data-nutie-theme-choice] small { margin-top: 2px; color: var(--text-muted); font-size: 12px; }
  .nutie-theme-option-icon { font-size: 22px; text-align: center; }
  .nutie-theme-check { color: var(--secondary-color); font-size: 20px; opacity: 0; }
  [data-nutie-theme-choice].is-selected { border-color: var(--secondary-color); background: color-mix(in srgb, var(--secondary-color) 10%, var(--bg-card)); }
  [data-nutie-theme-choice].is-selected .nutie-theme-check { opacity: 1; }
  body.nutie-theme-picker-open { overflow: hidden; }
}


/* 모바일 검색창 세로 밀도: 주요 게시판 검색창을 한 단계 낮게 */
@media (max-width: 768px) {
  .board-centered-search .search-input-wrapper,
  .product-lookup-search .search-input-wrapper,
  #view-product-info .search-input-wrapper {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 22px !important;
  }
}
