/* 바오마당 공통 탭 — 홈(포털)과 가족 기능(달력·사진첩·채팅)이 같이 쓴다.
   가족 기능은 네이버 밴드처럼 탭으로 옮겨 다니고, 중고 알리미·유플투쁠은 '특수 기능'으로 따로 연다.
   PC·태블릿: 머리글 아래 탭 줄 / 휴대폰: 화면 아래 고정 탭 */
.bar, .topbar { position: static !important; }
.shell-tabs {
  --sh-bg: var(--panel, #ffffff); --sh-line: var(--line, #d8dfd6); --sh-muted: var(--muted, #5d6a62);
  --sh-accent: var(--accent, #2f6040); --sh-danger: var(--danger, #b42318);
  position: sticky; top: 0; z-index: 30; display: flex; gap: 2px; padding: 0 max(12px, env(safe-area-inset-left));
  background: var(--sh-bg); border-bottom: 1px solid var(--sh-line); overflow-x: auto; scrollbar-width: none;
}
.shell-tabs::-webkit-scrollbar { display: none; }
.shell-tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 12px 18px 10px; color: var(--sh-muted);
  font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.shell-tabs a:hover { color: var(--sh-accent); }
.shell-tabs a.on { color: var(--sh-accent); border-bottom-color: var(--sh-accent); }
.shell-tabs a:focus-visible { outline: 3px solid color-mix(in srgb, var(--sh-accent) 45%, transparent); outline-offset: -3px; }
.shell-tabs svg { width: 21px; height: 21px; flex: 0 0 auto; }
.shell-tabs .soon { font-size: .66rem; font-weight: 600; color: var(--sh-muted); border: 1px solid var(--sh-line); border-radius: 999px; padding: 0 6px; }
.shell-tabs .dot-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sh-danger); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.shell-tabs .spacer { flex: 1; }

/* 더보기 · 홈에서 쓰는 목록 */
.menu-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.menu-list li + li { border-top: 1px solid var(--line, #d8dfd6); }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 4px; color: var(--ink, #1e2622);
  text-decoration: none; background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
}
.menu-list a::after { content: "›"; margin-left: auto; color: var(--muted, #5d6a62); font-size: 1.3rem; }
.menu-list .t { display: flex; flex-direction: column; min-width: 0; }
.menu-list .t b { font-weight: 600; }
.menu-list .t small { color: var(--muted, #5d6a62); }
.menu-list form { margin: 0; }
.menu-list button { color: var(--danger, #b42318); font-weight: 600; }
.section-title { font-size: 1.05rem; margin: 6px 2px 10px; display: flex; align-items: baseline; gap: 8px; }
.section-title small { color: var(--muted, #5d6a62); font-weight: 400; font-size: .85rem; }

.home-events { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.home-events a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel2, #f5f8f6); color: var(--ink, #1e2622); text-decoration: none; min-height: 58px; border: 1px solid transparent; }
.home-events a:hover { border-color: var(--c); }
.home-events .stripe { align-self: stretch; width: 5px; border-radius: 5px; background: var(--c); flex: 0 0 auto; }
.home-events img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 2px var(--c); }
.home-events .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-events .t small { color: var(--muted, #5d6a62); font-size: .82rem; }
.home-events .dd { font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 700; color: var(--accent, #2f6040); white-space: nowrap; }
.home-events .dd.today { background: var(--accent, #2f6040); color: var(--accent-ink, #fff); border-radius: 999px; padding: 1px 9px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-pill { font-size: .74rem; font-weight: 700; color: var(--accent, #2f6040); background: var(--accent-soft, #dcebd9); border-radius: 999px; padding: 1px 10px; }
.board-soon p { margin: 4px 0 0; }

/* 홈 맨 아래 특수 기능(중고 알리미·유플투쁠) 작은 아이콘 */
.tools { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line, #d8dfd6); }
.tools-title { font-size: .82rem; font-weight: 700; color: var(--muted, #5d6a62); margin: 0 2px 10px; letter-spacing: .02em; }
.tool-icons { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 88px; padding: 6px 2px; border-radius: 12px; color: var(--ink, #1e2622); text-decoration: none; }
.tool:hover { background: var(--panel2, #f5f8f6); }
.tool:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent, #2f6040) 45%, transparent); }
.tool-img { position: relative; display: block; }
.tool-img img { display: block; border-radius: 11px; }
.tool-img .badge { position: absolute; top: -6px; right: -12px; min-width: 20px; padding: 0 5px; font-size: .7rem; }
.tool-name { font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.25; }
.tool-status { font-size: .66rem; color: var(--muted, #5d6a62); max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tool-status.warn { color: var(--warn, #b45309); }

/* 머리글 오른쪽 '특수 기능' 버튼 (중고 알리미·유플투쁠로 가는 문) */
.tools-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted, #5d6a62); text-decoration: none; border: 1px solid var(--line, #d8dfd6); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.tools-btn svg { width: 16px; height: 16px; }
.tools-btn:hover { color: var(--accent, #2f6040); border-color: var(--accent, #2f6040); }
.tools-btn + .me, .tools-btn + .bell { margin-left: 0; }
.tool-list .tool { flex-direction: row; width: 100%; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 0; }
.tool-list .tool-img img { border-radius: 12px; }
.tool-list .tool-status { max-width: none; text-align: left; font-size: .8rem; }

@media (max-width: 699px) {
  .tools-btn span { display: none; }
  .tools-btn { padding: 6px 9px; }
  .shell-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; justify-content: space-around; gap: 0;
    padding: 2px 2px max(6px, env(safe-area-inset-bottom)); border-bottom: 0; border-top: 1px solid var(--sh-line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .07); overflow: visible;
  }
  .shell-tabs a { flex: 1; flex-direction: column; gap: 2px; padding: 7px 2px 4px; font-size: .72rem; border-bottom: 0; border-top: 3px solid transparent; }
  .shell-tabs a.on { border-top-color: var(--sh-accent); }
  .shell-tabs .soon { display: none; }
  .shell-tabs .dot-count { position: absolute; top: 3px; left: 55%; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}

/* PC·태블릿: 머리글(바오마당 · 특수 기능 · 검색 · 알림 · 글씨)과 탭을 네이버 밴드처럼 가운데 1240px 폭 안에 모은다.
   화면이 넓어도 메뉴가 양 끝으로 멀어지지 않는다. (휴대폰은 탭이 아래에 고정이라 그대로) */
@media (min-width: 700px) {
  .bar, .topbar { padding-inline: max(16px, calc((100% - 1240px) / 2 + 16px)) !important; }
  .shell-tabs { justify-content: center; }
}
