/* Lets the fixed 825px layout shrink to fit narrow screens; desktop stays the same. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; min-height: 100%; background-color: #000; }
img { max-width: 100%; height: auto; }

.jhjk_layout { width: auto; max-width: 825px; }
.jhjk_logo, .jhjk_footer { width: 100%; }
.jhjk_toolbar { width: 100%; height: auto; display: flow-root; }
.logo_center { max-width: 100%; }
.z_index_box_wrap { box-sizing: border-box; width: 100%; max-width: 820px; }
.z_index_content { width: 100%; max-width: 790px; }

@media (max-width: 840px) {
	/* iOS ignores fixed backgrounds and scaling a 1440px photo to a tall page blurs it */
	html { background-attachment: scroll; background-position: center top; }
	.jhjk_layout { width: 100%; }
	.logo_center { height: auto; }
	.logo_center img { display: block; }
	.z_index_box_wrap { padding: 12px 14px; }
	.z_index_content { font-size: 16px; line-height: 1.5; text-align: left; float: none; }
	.nicks, .num, .nick { font-size: 15px; }
	.jhjk_footer .num, .jhjk_footer .nick { font-size: 12px; }
	ul.nicks { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
	.jhjk_footer { font-size: 12px; padding: 12px 6px; box-sizing: border-box; }
	iframe { box-sizing: border-box; width: 100%; height: 70vh; }

	/* the menu is one line that scrolls sideways when it is wider than the screen */
	#toolbar_nav { display: flex; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
	#toolbar_nav::-webkit-scrollbar { display: none; }
	#toolbar_nav > li { float: none; flex: none; }
	#toolbar_nav > li > a { float: none; white-space: nowrap; }
	#toolbar_nav li.hz-flip-item { margin-left: auto; }
	#toolbar_nav a { font-size: 15px; height: auto; padding: 10px 8px; }
	#toolbar_nav a.live_chat_link img { width: 30px; height: 30px; margin: -5px 0; }
}

/* 4K and other big screens: scale the whole page instead of leaving a small box in the middle */
@media (min-width: 1900px) { html { zoom: 1.3; } }
@media (min-width: 2500px) { html { zoom: 1.7; } }
@media (min-width: 3400px) { html { zoom: 2.3; } }
