/* The header and footer, "dark & brass" (mockups/brass/dark/dark.css).
   Loaded on every page, old and new, so the tokens are scoped here rather than
   read from :root, where the older pages still set their own. */

.top, .foot {
  --c-page: #1C1A18; --c-d2: #0F0D0B;
  --c-line: rgba(242,235,221,.12);
  --c-ink: #F2EBDD; --c-muted: #C2B8A8;
  --c-acc: #C9A45C; --c-acc-2: #DDBB78; --c-on-acc: #1C1A18;
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -.005em;
}
.top :focus-visible, .foot :focus-visible { outline: 2px solid var(--c-acc); outline-offset: 3px; border-radius: 8px; }
.top a, .foot a { text-decoration: none; }
.c-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* header: sticky, the page's own near-black */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--c-page) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); color: var(--c-ink); border-bottom: 1px solid var(--c-line); }
.top .nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: inherit; }
.logo i { width: 24px; height: 24px; border-radius: 6px; background: var(--c-acc); flex: none; }
.menu { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; color: var(--c-muted); }
.menu a { padding: 12px 0; color: inherit; transition: color .2s; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--c-ink); }
.menu a[aria-current="page"] { box-shadow: 0 2px 0 var(--c-acc); }
.menu .menu-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 11px 20px; border-radius: 999px; background: var(--c-acc); color: var(--c-on-acc); font-weight: 700; transition: background .25s; }
.menu .menu-cta:hover { background: var(--c-acc-2); color: var(--c-on-acc); }
.menu-btn { display: none; }
.menu [hidden] { display: none; }

/* footer: the deepest black; the crisis line is always there */
.foot { padding: 40px 0 34px; background: var(--c-d2); color: var(--c-muted); font-size: 14px; line-height: 1.6; }
.foot .c-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.foot .logo { color: var(--c-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 12px; }
.foot nav a { display: inline-block; padding: 12px 6px; color: var(--c-ink); }
.foot nav a:hover { color: var(--c-acc-2); }
.foot .fine { flex-basis: 100%; display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.foot .fine > * { max-width: 64ch; margin: 0; }
.foot .crisis { color: var(--c-ink); }
.foot .copy, .foot address { font-size: 13px; font-style: normal; }

@media (max-width: 860px) {
  .c-wrap { padding: 0 20px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; font: 600 16px/1 inherit; font-family: inherit; color: var(--c-ink); cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .menu { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; background: var(--c-page); border-bottom: 1px solid var(--c-line); box-shadow: 0 18px 30px -20px rgba(0,0,0,.6); }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; border-top: 1px solid var(--c-line); color: var(--c-ink); font-size: 17px; }
  .menu a:first-child { border-top: 0; }
  .menu a[aria-current="page"] { box-shadow: none; color: var(--c-acc); }
  .menu .menu-cta { justify-content: center; margin-top: 12px; border: 0; }
}
:lang(ko) .top, :lang(ko) .foot { word-break: keep-all; }

/* KakaoTalk: the one floating button, on every page */
.kakao-float { position: fixed; z-index: 41; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1rem .7rem .85rem; border-radius: 999px; background: #FEE500; color: #191600; font-size: .875rem; font-weight: 700; text-decoration: none; box-shadow: 0 12px 28px -14px rgba(0,0,0,.6); transition: transform .3s cubic-bezier(.22, 1, .36, 1), bottom .3s ease; }
.kakao-float svg { width: 20px; height: 20px; fill: currentColor; }
.kakao-float:hover { transform: translateY(-2px); }
.kakao-float:focus-visible { outline: 2px solid var(--acc, #C9A45C); outline-offset: 3px; }

/* Cookie consent (GA4, PIPA opt-in): a card fixed to the bottom. Markup in
   templates/partials/site_footer.html, behaviour in static/js/consent.js. These rules were
   lost when the old stylesheet was removed ("the old design removed"), so the banner showed
   unstyled. display lives on :not([hidden]) so the hidden attribute still wins. Tokens come
   from brass.css and theme-cream.css, with the cream values as fallbacks. */
.cookie-consent:not([hidden]) {
  position: fixed; z-index: 45;
  left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px));
  max-width: 640px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 22px; border-radius: 16px;
  background: var(--card, #FBF7EE); color: var(--ink, #2B2420);
  box-shadow: inset 0 0 0 1px var(--line-2, rgba(43,36,32,.26)), 0 18px 40px -18px rgba(0,0,0,.45);
}
.cookie-consent__text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted, #5B4D43); }
.cookie-consent__text a { color: var(--ink, #2B2420); text-decoration: underline; text-underline-offset: 3px; }  /* an inline link inside a sentence: no padding, so the line spacing stays even */
.cookie-consent__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cookie-consent .btn, .cookie-consent .btn--ghost { min-height: 46px; padding: 11px 22px; font-size: 15px; }
.cookie-consent .btn--ghost { background: transparent; color: var(--ink, #2B2420); box-shadow: inset 0 0 0 1px var(--line-2, rgba(43,36,32,.26)); }
.cookie-consent .btn--ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--ink, #2B2420); }
@media (max-width: 560px) {
  .cookie-consent:not([hidden]) { left: 12px; right: 12px; padding: 18px; }
  .cookie-consent__actions .btn { flex: 1 1 0; }
}

/* "New answers": a small dot after the Questions and My posts links. Set by the server on forum pages, by js/forum-new.js elsewhere. */
a[data-new]::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--acc); vertical-align: middle; }
