:root {
  --sm-bg: #080808;
  --sm-paper: #141414;
  --sm-ink: #f3f3f3;
  --sm-muted: #9aa0a6;
  --sm-line: #2c2c2c;
  --sm-red: #ff1a1a;
  --sm-gold: #ffd000;
  --sm-head: 64px;
}
html, body {
  background: var(--sm-bg);
  color: var(--sm-ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}
body { margin: 0; }
.sm-skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.sm-skip:focus { left: 12px; z-index: 80; background: #fff; color: #111; padding: 8px 12px; }
.sm-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--sm-bg); }
.sm-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sm-line);
  box-shadow: inset 0 6px 0 var(--sm-red);
}
.sm-head-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: var(--sm-head);
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.sm-mark {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--sm-ink) !important;
  line-height: 1.05;
}
.sm-mark strong {
  font-size: 22px;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.sm-mark small {
  font-size: 11px;
  color: var(--sm-gold);
  letter-spacing: 0.02em;
  font-weight: 700;
}
.sm-burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
.sm-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--sm-ink);
}
.sm-nav { display: none; }
.sm-nav ul { list-style: none; margin: 0; padding: 0; }
.sm-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--sm-ink) !important;
  text-decoration: none !important;
  font-weight: 700;
}
.sm-nav > ul > li.on > a { color: var(--sm-red) !important; }
.sm-nav > ul > li > ul {
  display: none;
  padding: 0 0 8px 12px;
}
html.sm-nav-open .sm-nav > ul > li > ul { display: block; }
.sm-tools { display: none; }
.sm-account { display: flex; gap: 10px; font-size: 13px; font-weight: 700; }
.sm-account a { color: var(--sm-ink) !important; text-decoration: none !important; }
.sm-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 14px 40px;
  box-sizing: border-box;
}
.sm-foot {
  border-top: 1px solid var(--sm-line);
  background: var(--sm-paper);
  padding: 28px 16px calc(88px + env(safe-area-inset-bottom, 0px));
  color: var(--sm-muted);
}
.sm-foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sm-foot strong { color: var(--sm-ink); display: block; margin-bottom: 6px; }
.sm-foot p { margin: 0; font-size: 13px; line-height: 1.5; }
.sm-foot nav { display: flex; gap: 14px; }
.sm-foot a { color: var(--sm-muted) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }

html.sm-nav-open .sm-nav {
  display: block;
  position: fixed;
  inset: var(--sm-head) 0 0 0;
  background: var(--sm-bg);
  padding: 8px 18px 24px;
  overflow: auto;
  z-index: 39;
}
html.sm-nav-open, html.sm-nav-open body { overflow: hidden; }

@media (min-width: 901px) {
  .sm-head-inner { grid-template-columns: auto 1fr auto; }
  .sm-burger { display: none; }
  .sm-nav, .sm-tools { display: flex; align-items: center; gap: 16px; }
  .sm-nav { position: static; }
  .sm-nav > ul { display: flex; gap: 4px; }
  .sm-nav > ul > li { position: relative; }
  .sm-nav > ul > li > a { padding: 0 10px; font-size: 14px; }
  .sm-nav > ul > li > ul {
    display: none;
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    min-width: 160px;
    background: var(--sm-paper);
    border: 1px solid var(--sm-line);
    border-radius: 12px;
    padding: 10px 8px 8px;
  }
  .sm-nav > ul > li:hover > ul,
  .sm-nav > ul > li:focus-within > ul { display: block; }
  .sm-main { padding: 28px 24px 64px; }
  .sm-foot { padding-bottom: 36px; }
}

html.ph-obs .sm-head,
html.ph-obs .sm-foot,
html.ph-obs .phm-tab { display: none !important; }
html.ph-obs .sm-main { max-width: none; padding: 8px; }
