/* 统一页眉导航栏（所有页面共享） */
#i18n-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(13, 16, 23, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
#i18n-home {
  display: flex; align-items: center; gap: 7px;
  color: #eef2f8; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: opacity .15s;
}
#i18n-home:hover { opacity: .8; }
#i18n-lang-toggle {
  padding: 6px 16px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); color: #eef2f8;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
#i18n-lang-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.i18n-lang-box { position: relative; }
.i18n-lang-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 124px;
  background: #141a26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 6px 0;
  z-index: 999999;
}
.i18n-lang-box.open .i18n-lang-menu { display: block; }
.i18n-lang-menu a {
  display: block;
  padding: 8px 16px;
  color: #eef2f8;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.i18n-lang-menu a:hover { background: rgba(255, 255, 255, 0.08); }

/* 让出页眉空间 */
body {
  box-sizing: border-box;
  padding-top: calc(44px + env(safe-area-inset-top, 0px));
}

/* 魔方：顶部 HUD 下移，避开页眉 */
#title, #timer { top: calc(62px + env(safe-area-inset-top, 0px)) !important; }
#move-count, #layer-ind { top: calc(122px + env(safe-area-inset-top, 0px)) !important; }
