@media (max-width: 700px) and (max-device-width: 700px),
	   (max-height: 500px) and (max-device-height: 500px)
{
	html,
	body
	{
		width: 100%;
		height: 100%;
		height: var(--ol-app-height, 100dvh);
		margin: 0;
		overflow: hidden;
		-webkit-text-size-adjust: 100%;
	}

	#fullpage
	{
		height: 100%;
		height: var(--ol-app-height, 100dvh);
		min-height: 100%;
		min-height: var(--ol-app-height, 100dvh);
	}

	#hamheader
	{
		position: sticky;
		top: 0;
		z-index: 1000;
		background: var(--primary-bg-color);
		padding-top: env(safe-area-inset-top);
	}

	#tablecontainer
	{
		flex: 1 1 auto;
		min-height: 0;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: env(safe-area-inset-bottom);
	}

	#table_scroll
	{
		min-height: 100%;
	}

	:root,
	html
	{
		--timeWidth: 37px !important;
		--gnumWidth: 32px !important;
		--teamWidth: 66px !important;
		--scoreWidth: 44px !important;
		--bookWidth: 60px !important;
	}

	#schedule
	{
		font-size: 0.7rem;
	}

	#hamheader
	{
		font-size: 0.95em;
	}

	.before_screen_container
	{
		row-gap: 1.25em;
		height: auto;
		align-content: flex-start;
		justify-content: flex-start;
		column-gap: 0.5em;
	}

	.before_screen_popup
	{
		max-width: 92vw;
	}

	.before_screen_popup > div
	{
		padding: 20px !important;
	}

	.before_screen_container input[type=text],
	.before_screen_container input[type=password]
	{
		font-size: 16px;
	}

	#table_scroll th,
	#table_scroll td
	{
		padding: 1px 2px;
	}

	.popup:not(.before_screen_popup):not(.popup_confirm)
	{
		width: calc(100vw - 16px) !important;
		max-width: 94vw !important;
		height: calc(var(--ol-app-height, 100dvh) - 16px) !important;
		max-height: 92vh !important;
	}

	.before_screen_popup
	{
		width: min(92vw, 22em) !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		max-height: none !important;
		min-height: 0 !important;
		padding: 0 !important;
	}

	.before_screen_popup #popup_container
	{
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
		padding: 18px !important;
	}

	.before_screen_popup.popup
	{
		position: fixed !important;
		top: 50% !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		margin: 0 auto !important;
		transform: translateY(-50%);
	}

	.before_screen_container .link
	{
		flex-basis: calc(50% - 0.5em);
		display: block;
	}

	#forgot_password_button
	{
		text-align: left;
	}

	#sign_up_button
	{
		text-align: right;
	}

	#popup_container
	{
		max-height: 100%;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	.popup_header_container
	{
		position: sticky;
		top: 0;
		background: var(--bright-menu-bg-color);
		z-index: 2;
		padding-top: 4px;
	}

	.sidebar_popout
	{
		position: fixed !important;
		top: 8px !important;
		right: 8px !important;
		left: 8px !important;
		width: auto !important;
		height: calc(var(--ol-app-height, 100dvh) - 16px) !important;
		max-height: 92vh !important;
	}

	.sidebar_popout #popup_container
	{
		max-height: 100%;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	#header_container
	{
		row-gap: 6px;
	}

	#shortcut_items
	{
		flex-wrap: wrap;
		column-gap: 0.4em;
		margin-block: 0.2em 0;
	}

	.shortcut_button
	{
		padding: 5px 4px;
		font-size: 0.7em !important;
	}

	#market_menu
	{
		margin-right: 0.4em;
		margin-top: 0.15em;
		margin-left: 0.4em;
		position: relative;
		z-index: 1100;
	}

	#player_props_button
	{
		text-indent: -9999px;
		line-height: 0;
	}

    #player_props_button::after {
        content: 'PROPS';
        text-indent: 0;
        display: block;
        line-height: initial;
    }

	#items_menu
	{
		margin-left: 0.4em;
		margin-right: 0.3em;
		margin-top: 0.15em;
		position: relative;
		z-index: 1200;
	}

	#items_dropdown_list_container
	{
		z-index: 1201;
	}

	#items_dropdown_list_container > ul,
	#market_dropdown_list_container > ul,
	.market_dropdown_list_container > ul
	{
		font-size: 0.9em;
	}

	.dropdown_header_box
	{
		padding: 5px 4px;
		font-size: 0.62em !important;
	}

	.dropdown_header_text,
	#items_dropdown_container > span,
	#market_dropdown_container > span,
	#league_type_dropdown_container > span,
	#team_dropdown_container > span
	{
		display: inline-block;
		max-width: calc(100% - 18px);
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		vertical-align: middle;
	}

	#league_names
	{
		font-size: 0.78em;
	}

	.team > div
	{
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	#loading
	{
		font-size: 1.9em;
		flex-direction: column;
		text-align: center;
		align-items: center;
		justify-content: center;
		width: 100%;
		white-space: nowrap;
		position: relative;
		margin: 0;
	}

	#loading_container
	{
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	#loading .loading_text
	{
		text-align: center;
		display: block;
	}

	#loading .loading_shine
	{
		position: absolute !important;
		top: 50% !important;
		left: 50% !important;
		right: auto !important;
		bottom: auto !important;
		transform: translate(-50%, -50%);
		width: 100%;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		text-align: center !important;
	}
}

@media (max-width: 700px) and (max-device-width: 700px) and (orientation: landscape),
	   (max-height: 500px) and (max-device-height: 500px) and (orientation: landscape)
{
	:root,
	html
	{
		--teamWidth: 116px !important;
		--scoreWidth: 60px !important;
		--bookWidth: 78px !important;
	}

	#schedule
	{
		font-size: 0.7rem;
	}
}

@media (max-width: 700px) and (max-device-width: 700px) and (orientation: portrait)
{
	#header_container
	{
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto auto;
		align-items: center;
		column-gap: 0.5em;
		row-gap: 0.4em;
	}

	#items_menu
	{
		grid-column: 1;
		grid-row: 1;
		width: 100%;
	}

	#market_menu
	{
		grid-column: 1;
		grid-row: 2;
		width: 100%;
	}

	#shortcut_menu
	{
		grid-column: 2;
		grid-row: 1 / span 2;
		width: 100%;
		justify-self: center;
		align-self: center;
	}

	#shortcut_items
	{
		justify-content: center;
	}

	#league_menu
	{
		grid-column: 1 / -1;
		grid-row: 3;
		width: 100%;
	}

	#items_dropdown_container,
	#market_dropdown_container,
	.dropdown_header_box
	{
		width: 100% !important;
		box-sizing: border-box;
	}

	#items_dropdown_list_container,
	#market_dropdown_list_container,
	.market_dropdown_list_container
	{
		width: 100% !important;
		left: 0 !important;
	}
}

@media (max-width: 480px) and (max-device-width: 480px)
{
	:root
	{
		--timeWidth: 37px !important;
		--gnumWidth: 32px !important;
		--teamWidth: 66px !important;
		--scoreWidth: 44px !important;
		--bookWidth: 60px !important;
	}

	#schedule
	{
		font-size: 0.6rem;
	}

	#hamheader
	{
		font-size: 0.86em;
	}

	.shortcut_button
	{
		font-size: 0.58em !important;
		padding: 4px 3px;
	}

	.dropdown_header_box
	{
		font-size: 0.58em !important;
		padding: 4px 3px;
	}

	#market_dropdown_container,
	#items_dropdown_container
	{
		/* width: 8.5em !important; */
	}

	#market_dropdown_list_container,
	.market_dropdown_list_container,
	#items_dropdown_list_container
	{
		/* width: 11.5em !important; */
	}
}
