/* 게임실험연구소 공통 2단 헤더 */
.common-site-header-wrap {
  position: relative;
  z-index: 2147481000;
  width: 100%;
  background: rgba(15,17,21,.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.common-site-header {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
}

.common-site-header__title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  overflow: hidden;
}

.common-site-header__logo {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.common-site-header__logo img { width:100%; height:100%; object-fit:contain; display:block; }

.common-site-header__home {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 6px 0 0;
  color: #e6e9ef;
  font-size: clamp(12px,1.05vw,16px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.common-site-header__home-mobile { display:none; }

.common-site-header__menu-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 24px;
  height: 24px;
  margin: 0;
  padding: 0 7px;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  color: #e5e7eb;
  font: inherit;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}
.common-site-header__menu-btn:hover { background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.24); color:#fff; }
.common-site-header__menu-btn svg { flex:0 0 auto; width:14px; height:14px; }
.common-site-header__menu-btn svg rect,
.common-site-header__menu-btn svg path { fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.common-site-header__label { display:block; font-size:11px; font-weight:700; line-height:1; white-space:nowrap; }
.common-site-header__actions {
  flex:0 0 auto;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:32px;
  font-size:12px;
  color:#9aa3b2;
}

.common-site-header__auth {
  flex:0 0 auto;
  min-width:104px;
  min-height:32px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.common-site-header__google-button {
  position:relative;
  width:104px;
  height:32px;
  flex:0 0 104px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  border-radius:999px;
  filter:drop-shadow(0 0 7px rgba(66,133,244,.42));
  transition:transform .16s ease, filter .16s ease;
}

.common-site-header__google-button:hover {
  transform:translateY(-1px);
  filter:drop-shadow(0 0 11px rgba(66,133,244,.72));
}

.common-site-header__google-button > div {
  width:104px !important;
  min-width:104px !important;
  max-width:104px !important;
  height:32px !important;
  overflow:hidden !important;
  border-radius:999px !important;
}

.common-site-header__google-button iframe {
  width:104px !important;
  min-width:104px !important;
  height:32px !important;
  border-radius:999px !important;
}

.common-site-header__google-button::after {
  content:"";
  position:absolute;
  inset:-2px;
  z-index:-1;
  border-radius:999px;
  border:1px solid rgba(110,168,255,.48);
  box-shadow:0 0 0 1px rgba(255,255,255,.05), 0 0 12px rgba(66,133,244,.30);
  pointer-events:none;
}

.common-site-header__google-logo {
  width:15px;
  height:15px;
  flex:0 0 15px;
  display:block;
}

.common-site-header__auth-loading {
  color:#8f99aa;
  font-size:10px;
  white-space:nowrap;
}

.common-site-header__logout-btn,
.common-site-header__auth-fallback {
  height:30px;
  min-width:78px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.035));
  color:#e7ebf2;
  font:inherit;
  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.common-site-header__logout-btn:hover,
.common-site-header__auth-fallback:hover {
  color:#fff;
  border-color:rgba(110,168,255,.58);
  background:linear-gradient(180deg,rgba(110,168,255,.17),rgba(110,168,255,.065));
}

.common-site-header__phrase-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 8px;
  border-top: 1px solid rgba(255,255,255,.065);
  background: linear-gradient(90deg, rgba(110,168,255,.055), rgba(255,255,255,.015) 48%, rgba(207,162,79,.045));
  overflow: hidden;
}

.common-site-header__phrase-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(110,168,255,.34);
  background: rgba(110,168,255,.10);
  color: #bcd4ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.common-site-header__phrase-text {
  flex: 1 1 auto;
  min-width: 0;
  color: #dce4f1;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease;
}
.common-site-header__phrase-text.is-changing { opacity:0; transform:translateY(2px); }
.common-site-header__phrase-text.is-muted { color:#8993a3; }

.common-site-header__phrase-message {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  vertical-align: middle;
}
.common-site-header__phrase-nick { flex:0 0 auto; color:#e9edf5; font-weight:800; }
.common-site-header__phrase-dot { flex:0 0 auto; color:#798394; }
.common-site-header__phrase-copy { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.common-site-header__phrase-badge { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; }
.common-site-header__phrase-badge.is-senior {
  min-width: 27px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(207,162,79,.62);
  background: linear-gradient(135deg,#fff0b5,#e8bd56 52%,#a97821);
  box-shadow: 0 0 8px rgba(250,204,21,.22), inset 0 1px 0 rgba(255,255,255,.45);
  font-size: 11px;
}
.common-site-header__phrase-badge.is-lead {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab1be;
  box-shadow: 0 0 0 1px rgba(170,177,190,.25);
}
.common-site-header__phrase-text.is-senior .common-site-header__phrase-message,
.common-site-header__phrase-text.is-admin .common-site-header__phrase-message {
  position: relative;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.35));
}

.common-site-header__phrase-text.is-senior .common-site-header__phrase-copy,
.common-site-header__phrase-text.is-admin .common-site-header__phrase-copy {
  color: #fef9c3;
  text-shadow:
    0 0 4px rgba(250, 204, 21, 0.65),
    0 0 8px rgba(250, 204, 21, 0.82),
    0 0 14px rgba(250, 204, 21, 0.95);
}

.common-site-header__phrase-text.is-senior .common-site-header__phrase-nick,
.common-site-header__phrase-text.is-admin .common-site-header__phrase-nick {
  color: #e5e7eb;
  text-shadow:
    0 0 3px rgba(59, 130, 246, 0.55),
    0 0 7px rgba(59, 130, 246, 0.75);
}

.common-site-header__phrase-text.is-senior .common-site-header__phrase-dot,
.common-site-header__phrase-text.is-admin .common-site-header__phrase-dot {
  color: #facc15;
  opacity: 0.9;
}

.common-header-bridge { display:none !important; }

/* 모바일 전용 헤더 컨트롤 */
.common-site-header__mobile-only { display:none; }

.common-site-header__mobile-menu {
  position:relative;
  flex:0 0 auto;
}

.common-site-header__mobile-menu-popover {
  position:absolute;
  pointer-events:auto;
  top:calc(100% + 7px);
  right:0;
  z-index:10020;
  min-width:112px;
  padding:5px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:rgba(22,25,31,.98);
  box-shadow:0 12px 28px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(10px);
}

.common-site-header__mobile-menu-popover[hidden] { display:none !important; }

.common-site-header__mobile-menu-popover button {
  width:100%;
  height:30px;
  padding:0 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#dfe6f1;
  font:inherit;
  font-size:11px;
  font-weight:750;
  text-align:left;
  white-space:nowrap;
  cursor:pointer;
}

.common-site-header__mobile-menu-popover button:hover,
.common-site-header__mobile-menu-popover button:focus-visible {
  background:rgba(110,168,255,.12);
  color:#fff;
  outline:none;
}

@media (max-width: 980px) {
  .common-site-header { padding:10px 12px 8px; overflow-x:auto; }
  .common-site-header__title { overflow:visible; min-width:max-content; }
  .common-site-header__actions { display:flex; gap:6px; }
  .common-site-header__auth { min-width:104px; }
  .common-site-header__home { max-width:180px; }
  .common-site-header__phrase-bar { min-height:32px; padding:6px 12px 7px; gap:8px; }
  .common-site-header__phrase-label { height:18px; padding:0 7px; font-size:9px; }
  .common-site-header__phrase-text { font-size:11px; }
}

@media (max-width: 620px) {
  .common-site-header {
    position:relative;
    overflow:visible;
    gap:0;
    padding:9px 9px 8px;
    min-height:46px;
  }

  .common-site-header__title {
    flex:1 1 100%;
    width:100%;
    min-width:0;
    overflow:hidden;
    padding-right:196px;
    box-sizing:border-box;
  }

  .common-site-header__home {
    max-width:100%;
    margin-right:0;
    font-size:13px;
    font-weight:700;
  }
  .common-site-header__home-desktop { display:none; }
  .common-site-header__home-mobile { display:inline; }

  /* 모바일에서는 제목 영역의 기존 내정보/문의/Q&A를 숨기고 우측 액션 영역으로 통합 */
  .common-site-header__title > #chmHeaderUsage,
  .common-site-header__title > #chmHeaderContact,
  .common-site-header__title > #chmHeaderFaq {
    display:none !important;
  }

  .common-site-header__mobile-only {
    display:inline-flex;
  }

  .common-site-header__actions {
    position:absolute;
    top:8px;
    right:9px;
    z-index:2147482000;
    flex:0 0 auto;
    margin-left:0;
    gap:4px;
    min-height:30px;
    overflow:visible;
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
  }

  .common-site-header__actions > :not(#commonHeaderAuth):not(#chmHeaderUsageMobile):not(#commonHeaderMobileMenu) {
    order:0;
  }

  .common-site-header__auth {
    order:1;
    min-width:66px;
    min-height:28px;
  }

  #chmHeaderUsageMobile { order:2; }
  #commonHeaderMobileMenu { order:3; }

  .common-site-header__menu-btn {
    min-height:28px;
    height:28px;
    padding:0 6px;
    gap:3px;
    border-radius:7px;
  }

  .common-site-header__menu-btn svg {
    width:13px;
    height:13px;
  }

  .common-site-header__label { font-size:10px; }

  .common-site-header__google-button {
    width:66px;
    height:28px;
    flex-basis:66px;
  }

  /* Google small 버튼을 30px 높이로 강제 확대하지 않는다.
     바깥 로그인 영역을 로그아웃 버튼과 비슷한 66x28로 줄이고, 실제 Google 콘텐츠는
     64x24로 가운데 놓아 글자와 로고가 자연스럽게 보이게 한다. */
  .common-site-header__google-button {
    overflow:hidden;
    background:#1a73e8;
    border-radius:999px;
  }

  .common-site-header__google-button > div {
    width:64px !important;
    min-width:64px !important;
    max-width:64px !important;
    height:24px !important;
    margin:auto !important;
    overflow:hidden !important;
    border-radius:999px !important;
  }

  .common-site-header__google-button iframe {
    width:64px !important;
    min-width:64px !important;
    max-width:64px !important;
    height:24px !important;
    border-radius:999px !important;
  }

  .common-site-header__auth-fallback {
    width:66px;
    min-width:66px;
    height:28px;
    padding:0 8px;
    font-size:10px;
  }

  .common-site-header__logout-btn {
    min-width:62px;
    height:28px;
    padding:0 9px;
    font-size:10px;
  }

  .common-site-header__mobile-menu-popover {
    position:fixed;
    top:auto;
    right:auto;
    min-width:104px;
  }

  .common-site-header__phrase-bar { padding-left:10px; padding-right:10px; }
  .common-site-header__phrase-label { display:none; }
  .common-site-header__phrase-message { gap:5px; }
  .common-site-header__phrase-nick { max-width:92px; overflow:hidden; text-overflow:ellipsis; }
}
@media (max-width: 360px) {
  .common-site-header__title { padding-right:172px; }
  .common-site-header__home { font-size:12px; }
  .common-site-header__auth { min-width:64px; }
  .common-site-header__google-button { width:64px; flex-basis:64px; }
  .common-site-header__google-button > div,
  .common-site-header__google-button iframe { width:62px !important; min-width:62px !important; max-width:62px !important; }
  .common-site-header__auth-fallback { width:64px; min-width:64px; padding:0 6px; }
  .common-site-header__logout-btn { min-width:58px; padding:0 7px; }
  .common-site-header__menu-btn { padding:0 5px; }
}

