/* 페이지 전체 뼈대: 바탕 · 글자 · 머리 · 본문 폭. 색과 크기는 tokens.css 에서 온다 */
/* 글꼴 Pretendard 는 fonts/pretendard.css 가 부른다 (글자 묶음별 작은 파일 92개. 화면에 나온 글자가 든 것만 받는다) */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2xl); letter-spacing: -0.02em; }
h2 { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-md); font-weight: 700; }
p { margin: 0; }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: var(--w-page); margin: 0 auto; }
main.wrap { padding-block: var(--sp-5) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); }

/* 목업 안내 띠 */
.mock-bar { background: var(--c-highlight); color: var(--c-highlight-ink); font-size: var(--fs-xs); font-weight: 600; }
.mock-bar .wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; padding-block: 6px; }
.mock-bar label { display: flex; gap: var(--sp-1); align-items: center; }
.mock-bar select { background: transparent; border: 1px solid currentColor; border-radius: var(--r-sm); padding: 1px 4px; font-weight: 600; max-width: 100%; }
.mock-bar .spacer { flex: 1; }

/* 머리 — 한 줄: 이름 · 메뉴 · 계정. 좁으면 메뉴가 둘째 줄로 내려간다 */
.site-head { background: var(--c-surface); border-bottom: 1px solid var(--c-line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.head-bar { display: flex; align-items: center; gap: var(--sp-5); min-height: 56px; }
.site-name { font-weight: 800; font-size: 21px; letter-spacing: -0.03em; text-decoration: none; line-height: 1; white-space: nowrap; color: var(--c-ink); }
.nav { display: flex; gap: var(--sp-5); overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 16px 0; color: var(--c-ink-soft); font-weight: 600; font-size: var(--fs-md); white-space: nowrap; transition: color 120ms ease-out; }
.nav a[aria-current="page"] { color: var(--c-ink); }
.nav a.nav--admin { color: var(--c-accent); }
.head-right { display: flex; align-items: center; gap: var(--sp-3); white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; }
.head-right form { margin: 0; }
.head-right__me { color: var(--c-ink-soft); font-weight: 500; }
.util-link { background: none; border: 0; padding: 6px 2px; color: var(--c-ink); text-decoration: none; cursor: pointer; font-size: inherit; font-weight: inherit; }

/* 검색 칸 (파티 찾기 화면 위) */
.search { display: flex; align-items: center; gap: 8px; width: min(360px, 100%); background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: var(--r-md); padding-left: 14px; overflow: hidden; }
.search:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.search__input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; font-size: 16px; outline: none; }
.search__input::placeholder { color: var(--c-ink-soft); }
.search__btn { border: 0; background: transparent; color: var(--c-accent); padding: 0 14px; align-self: stretch; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }

/* 전체 메뉴 — 누르면 묶음별 목록이 펼쳐진다 (스크립트 없이 details 로) */
.allmenu { position: relative; display: flex; }
.allmenu__btn { list-style: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-md); cursor: pointer; }
.allmenu__btn::-webkit-details-marker { display: none; }
.allmenu__icon, .allmenu__icon::before, .allmenu__icon::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.allmenu__icon { position: relative; }
.allmenu__icon::before, .allmenu__icon::after { content: ""; position: absolute; left: 0; }
.allmenu__icon::before { top: -5px; }
.allmenu__icon::after { top: 5px; }
.allmenu__panel { position: absolute; top: calc(100% + 6px); right: 0; min-width: 260px; max-width: calc(100vw - 32px); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--sp-4); display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-4); white-space: normal; }
.allmenu__group { display: flex; flex-direction: column; gap: 6px; }
.allmenu__group a { text-decoration: none; font-size: var(--fs-sm); color: var(--c-ink); }
.allmenu__group a[aria-current="page"] { color: var(--c-accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (hover: hover) {
  .nav a:hover { color: var(--c-ink); }
  .util-link:hover { color: var(--c-accent); }
  .allmenu__btn:hover { background: var(--c-surface-2); }
  .allmenu__group a:hover { color: var(--c-accent); }
}
@media (max-width: 720px) {
  .head-bar { flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a { padding: 12px 0; }
  .head-right { margin-left: auto; }
  .head-right__me { display: none; }
}

.site-foot { color: var(--c-ink-soft); font-size: var(--fs-xs); text-align: center; padding-block: var(--sp-6); margin: var(--sp-5) auto 0; display: flex; flex-direction: column; gap: 6px; max-width: 860px; }
.site-foot > div:first-child { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); }
.site-foot a { text-decoration: none; }
@media (hover: hover) { .site-foot a:hover { text-decoration: underline; } }

.muted { color: var(--c-ink-soft); }
.small { font-size: var(--fs-sm); }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-5); }
.row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--sp-3); }
.page-head p { color: var(--c-ink-soft); margin-top: var(--sp-1); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
