.gambu_wrapper { --game_bg_color: #ffffff; --game_text_color: #333333; --exercise_height: 0px; }

.game_wrapper { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); height: calc(100% - var(--exercise_height)); user-select: none; background-color: var(--game_bg_color); }
.pixi_wrapper { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; aspect-ratio: var(--game_ratio); }
.pixi { height: 100%; position: relative; }
.pixi canvas { display: block; max-width: 100%; }
.pixi {
    width: min(var(--game_width), var(--game_height) * var(--game_w_to_h));
    height: min(var(--game_height), 1 / var(--game_w_to_h) * var(--game_width));
}
.pixi canvas { width: 100%; }
    
.game_name_box { position: fixed; z-index: 2; font-size: min(1em, 3.5vw); text-align: center; width: max-content; min-width: 8em; padding: .1em 0.6em; background-color: #ffef8a; border-radius: 0.7em; line-height: 1.2; font-weight: bold; box-shadow: 0.1em 0.1em 0.2em #00000080; }
/* .game_wrapper .game_name_box { position: absolute; left: 0 !important; top: 0 !important; transform: translate(0%, -100%); font-size: 1em !important; font-weight: bold; min-width: 4em; border: none; background-color: transparent; text-align: left; } */

.game_message { display: none; position: absolute; width: 15em; font-size: 1.2em; left: calc(50% - 7.5em); top: calc(50% - 3em); padding: 0.4em; text-align: center; border-radius: var(--br); box-shadow: 0.1em 0.2em 0.3em #00000096; line-height: 1.2; border: solid .08em #444444; }
.game_message.msg_win { background-color: #82ff82; color: black; }
.game_message.msg_lose { background-color: #ff8585; color: black; }
.game_message.msg_bot_fight { z-index: 2; left: calc(50% - 4em); top: calc(100% - 15em); width: 8em; font-size: .8em; height: 4em; background-color: #fdfce8; cursor: move; transition: left .3s linear, top .3s linear, font-size .3s linear; }
.game_message.msg_bot_fight.ui-draggable-dragging { transition: none; } 
.game_message.msg_bot_fight.bot_fight_center { left: calc(50% - 4em) !important; top: calc(50% - 2em) !important; font-size: 1.2em; }
.game_message.msg_info { background-color: rgb(182, 213, 246); }
.game_message button { margin-top: .3em; font-size: .8em; }
.result_message { display: inline-block; }
.gambu_ui { display: flex; height: 100%; left: 0px; padding: 0.16em; column-gap: .16em; align-items: center; justify-content: center; pointer-events: none; }
.gambu_ui * { pointer-events: all; }
.type_selector_button { display: flex; flex-direction: column; align-items: center; row-gap: 0; }
.game_ui { display: flex; justify-content: space-evenly; width: 100%; color: var(--game_text_color); user-select: none; -webkit-user-select: none; padding-top: 1em; /* more space for contributors */ }
.main_game_text { font-size: 1.3em; min-width: 4em; text-align: center; }
.file_buttons { position: relative; min-width: 7.4em; height: 100%; display: flex; flex-direction: column; justify-content: space-around; overflow: hidden; }
.file_buttons .button { width: 100%; display: inline-block; border-radius: var(--br); color: var(--color_main); background-color: white; border: solid 1px; font-size: .8em; text-transform: uppercase; text-align: center; padding: .2em; margin: .1em 0; }

.menu_alert { display: none; position: absolute; left: calc(50% - min(45%, 8em)); width: min(90%, 16em); top: 1em; background-color: #fff; border-radius: var(--br); text-align: center; padding: .5em; box-shadow: .1em 0.1em 0.4em #333; z-index: 3; }
.menu_alert_text { line-height: 1.2; margin-bottom: .3em; }
.menu_alert_btn { font-size: .8em; }

.world_settings { display: flex; column-gap: 1em; align-items: center; --label_color: #333; }
.world_settings input { display: none; }
.world_settings input + label { position: relative; cursor: pointer; }
.world_settings input[type="radio"] + label { padding-left: 1em; }
.world_settings input[type="radio"] + label::before { content: ""; position: absolute; left: 0.1em; top: 50%; width: 0.6em; height: 0.6em; box-shadow: 0 0 0 2px var(--label_color); border-radius: 50%; transform: translateY(-50%); border: solid 2px white; background-color: #fff; }
.world_settings input[type="radio"]:checked + label::before { background-color: var(--label_color); }
#gravity + label > .gravity_switch { position: relative; display: inline-block; width: 1.6em; height: 0.9em; border-radius: 0.45em; border: solid .12em var(--label_color); background: white; }
#gravity + label > .gravity_switch::before { content: ""; position: absolute; left: .1em; top: .06em; width: 0.55em; height: 0.55em; background-color: var(--label_color); border-radius: 50%; transition: left .2s; }
#gravity:checked + label > .gravity_switch::before { left: .75em; }
#gravity + label > .gravity_switch::after { position: relative; content: "AUS"; display: inline-block; left: 2.2em; top: -0.5em; font-size: .8em; font-family: var(--font_mono); }
#gravity:checked + label > .gravity_switch::after { content: "EIN" }
.tiles_wrapper { position: relative; display: flex; column-gap: .5em; }

.ui_box { border-radius: var(--br); background-color: var(--color_main_lightest); padding: .4em; }
.player_preview { display: flex; align-items: center; background-color: #f9fdff; border-radius: var(--br); }
.player_preview img { display: block; width: 4em; padding: .5em; background-color: transparent; border-radius: var(--br); transition: transform .2s linear; }
.player_preview div { font-size: .8em; text-align: center; text-transform: uppercase; line-height: 1; padding-top: .2em; color: var(--color_main); }
.main_ui { position: relative; width: 100%; height: 6.7em; display: flex; justify-content: center; font-size: min(1em, 1.9vw); }
.builder_ui { align-items: stretch; column-gap: .5em; }
.bottom_ui { align-items: flex-start; font-size: min(1em, 2.3vw); padding: .5em 0; }
.type_selector { margin: .2em; }
#balls .type_selector { border-radius: 50%; }
.selection_border { box-shadow: 0 0 0 .12em #003AA8; }
.tiles_menu { display: flex; }
.tiles_menu img { width: 2.0em; }
.tile_info_box { font-size: 0.9em; width: 6.5em; color: #225784; display: flex; align-items: center; justify-content: center; text-align: center; flex-direction: column; background-color: #f9fdff; border-radius: var(--br); line-height: 1.1; }
.tile_info_box img { display: none; width: 2em; }
.tile_info_box strong { padding-bottom: .3em; }


.menu_2nd_lvl { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color_main_lightest); padding: .5em; border-radius: var(--br); transform: translateX(100%); transition: transform .3s; }
.menu_2nd_lvl::before { content: "τ"; font-family: "icons"; position: absolute; font-size: 0.8em; right: 0.1em; top: 0.1em; line-height: 1; color: var(--color_main_dark); cursor: pointer; }
.menu_2nd_lvl .header_2nd_lvl { font-size: .8em; line-height: 1.1; letter-spacing: .05em; color: var(--color_main_dark); text-align: center; }
.show_2nd { transform: translateX(0); }

.protoype_graphics_info { font-size: .8em; position: absolute; bottom: 0; color: red; }

.publish_dialog { --dialog_width: min(90%, 500px); font-size: min(.9em, 4.5vw); position: fixed; z-index: 4; left: calc(50% - var(--dialog_width) / 2); top: 50%; transform: translateY(-50%); width: var(--dialog_width); background-color: var(--color_main_lightest); box-shadow: 0.2em 0.2em 0.6em #000; padding: .3em; border-radius: var(--br); border: solid 1px #b5b5b5; max-height: min(100%, var(--publish_height)); overflow: auto; display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: var(--publish_height); display: none; }
.gambu_dialog_bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #00000078; left: 0; top: 0; z-index: 3; display: none; /* backdrop-filter: blur(2px); */ }
.publish_header { font-size: 1.2em; color: var(--color_main); padding: 0 0 0.2em 0.2em; display: flex; justify-content: space-between; }
.publish_header .button_close { position: relative; font-size: 1.2em; border-radius: var(--br); width: 1em; transform: none; display: flex; justify-content: flex-end; align-items: center; color: var(--color_main); line-height: 1; background-color: transparent; transition: color 0.2s ease; translate: unset; border: none; cursor: pointer; top: 0; right: 0; line-height: 1; height: 1.2em; }
.publish_form_box { border: solid 1px #fff; outline: solid 1px #888; overflow: auto; padding: .8em .3em .3em .3em; overflow: auto; height: calc(100%); background-color: var(--color_bg); }
.publish_grid { display: grid; grid-template-columns: auto minmax(0, 1fr); margin-bottom: .7em; gap: .7em; }
.publish_check_wrapper { line-height: 1.2; display: flex; align-items: flex-start; margin-bottom: .7em; }
.publish_grid_line { margin-bottom: .3em; }
.publish_dialog input[type="radio"], .publish_dialog input[type="checkbox"] { margin: .3em .5em; }
.publish_dialog input[type="text"], .publish_dialog select { font-size: 1em; font-family: var(--font_main); border: solid 1px var(--color_main); border-radius: 0.2em; padding: 0.1em 0.3em; }

.publish_msgs_box { min-height: 1em; }
.publish_valid_msgs, .publish_info_msgs { margin: 0 0 0.4em 0; border: solid 1px #999; line-height: 1.2; padding: 0.3em .2em 0.3em 1.6em; border-radius: var(--br); color: black; display: none; font-size: .85em; }
.publish_valid_msgs { background-color: #ffdada; }
.publish_info_msgs { background-color: #fef6cd; }

.publish_valid_msgs li, .publish_info_msgs li { line-height: 1.1; padding: .1em 0; }
.pub_invalid { color: red; }
.publish_button_box { padding-top: .5em; text-align: center; }
#btn_publish_game { margin: 0 auto; display: block; text-transform: uppercase; letter-spacing: 0.08em; }
#btn_publish_game.publish_check { margin: 0; text-transform: unset; letter-spacing: unset; }
.publish_ready_box { display: flex; flex-direction: column; justify-content: center; min-height: 100%; padding: 0 3%; }
.publish_icon_ok { text-align: center; color: green; margin: .5em; }
.publish_icon_ok em { font-size: 3em; line-height: 1; display: inline-block; animation: pub_ok .6s .2s linear forwards; opacity: 0; }
@keyframes pub_ok {
    0%  { transform: scale(0) rotateY(0deg); opacity: 0; } 
    40%  { transform: scale(.75) rotateY(180deg); opacity: 1; } 
    80% { transform: scale(1.5) rotateY(360deg); opacity: 1; } 
    100% { transform: scale(1) rotateY(360deg); opacity: 1; } 
}
.publish_link_box { width: max-content; padding: 0.3em .2em; color: var(--color_main_darkest); margin: 0.7em auto; background-color: var(--color_main_lighter); min-width: 90%; text-align: center; border-radius: var(--br); }
.publish_update_info { margin: -0.8em -0.3em .5em; padding: 0.2em; line-height: 1.2; background: #fef6cd; border-bottom: solid 1px #ccc; }

.save_confirm_dialog { position: absolute; z-index: 2; left: calc(50% - min(45%, 10em)); top: calc(50% - 3em); width: min(90%, 20em); display: flex; justify-content: space-evenly; flex-wrap: wrap; background-color: white; padding: .5em; row-gap: .5em; box-shadow: .1em .1em 0.4em; border-radius: var(--br); }
.asset_texture_box > div:first-child { text-align: center; margin-bottom: .3em; font-size: .9em; line-height: 1; min-height: 2.2em; display: flex; align-items: center; justify-content: center; }
.save_confirm_dialog button { text-align: center; width: 7em; }

.bot_panel { display: none; --commands_box_w: 6em; --console_h: 26px; --top_gap: 0em; position: absolute; overflow: hidden; background-color: white; width: 400px; max-width: min(100vw, 800px); min-width: 240px; height: 200px; max-height: 600px; min-height: 180px; z-index: 3; box-shadow: 0.2em 0.2em 0.2em hsla(0, 0%, 0%, 0.4);}
.bot_panel_header { display: flex; height: calc(1.4em + var(--top_gap)); border-bottom: solid var(--top_gap) white; padding: 0.0em 0.0em 0.0em 0.5em; flex-direction: row; justify-content: space-between; align-items: center; color: white; background-color: #004d83; cursor: move; cursor: grab;}
.GamBuScript { display: inline-block; width: 100%; background-color: white; white-space: pre; margin: 0.1em; font-size: 0.8em; outline: none; font-family: var(--font_mono); min-height: calc(100% - .3em - var(--top_gap)); height: max-content; overflow-x: auto; }
.bot_panel .script_box { display: flex; padding: 0em .9em 0em 0em; background-color: white; height: 100%; width: 100%; height: calc(100% - var(--console_h) - 1.4em - var(--top_gap)); transition: width .3s; overflow-y: auto; }

.bot_panel .ui-resizable-handle { position: absolute; right: 0.2em; bottom: 0.1em; line-height: 1; font-size: 0.8em; }
.bot_panel .button_close { position: relative; font-size: 1.2em; border-radius: var(--br); width: max-content; transform: none; display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; color: var(--color_main); line-height: 1; background-color: transparent; transition: color 0.2s ease; color: white; translate: unset; border: none; cursor: pointer; top: 0; right: 0; line-height: 1; height: 1.2em; }
.bot_panel .button_close > span { font-size: .7em; }
.script_commands_box { position: absolute; right: 0; top: 1.4em; transform: translateX(100%); width: var(--commands_box_w); height: calc(100% - 1.4em - var(--console_h)); background-color: #d8d8d8; transition: transform .3s; }
.script_commands { overflow-y: auto; height: 100%; }
.script_commands_handle { position: absolute; writing-mode: vertical-rl; text-orientation: upright; line-height: 1; top: 50%; left: 0; background-color: #d8d8d8; font-size: 0.7em; letter-spacing: -0.1em; text-transform: uppercase; padding: 0.4em 0.1em; transform: translate(-100%, -50%); border-radius: 0.3em 0 0 .3em; font-family: var(--font_mono); cursor: pointer; }
.script_commands > div { font-size: .8em; line-height: 1.2; padding: 0em .2em; background: #ffffff; margin: 0.3em; cursor: pointer; border-radius: 0.2em; }
.script_commands > div:hover { background-color: var(--color_main_lightest); color: #000; }
.script_console { background-color: #eee; border-top: 1px solid gray; height: var(--console_h); font-size: .9em; position: absolute; bottom: 0; left: 0; width: 100%; }

.bot_panel.commands_open .script_commands_box { transform: translateX(0); }
.bot_panel.commands_open .script_box  { width: calc(100% - var(--commands_box_w)); }

.context_menu { position: absolute; height: auto; width: auto; border-radius: var(--br); background-color: var(--color_main_lightest); padding: .4em; box-shadow: 0.2em 0.2em 0.4em #00000080; z-index: 5; pointer-events: auto }
.context_buttons { min-width: 6em; display: flex; flex-direction: column; justify-content: space-around; overflow: hidden; }
.context_buttons .button { width: 100%; display: inline-block; border-radius: var(--br); color: var(--color_main); background-color: white; border: solid 1px; font-size: .8em; text-transform: uppercase; text-align: center; padding: .2em; margin: .1em 0; }

.line_numbers { width: 1.5em; height: var(--box_height); min-height: 100%; background-color: var(--color_main_lighter); color: #4f4f4f; overflow: hidden; padding-right: 0.1em; margin-right: 0.1em; letter-spacing: -0.08em; padding-top: .1em; font-family: var(--font_mono); font-size: .7em; text-align: right; line-height: calc(1.4 / 7 * 8); }

.speechbubble { position: absolute; left: 0; top: 0; padding: 0.2em 0.4em; min-width: 2.5em; text-align: center; font-size: min(0.8em, 2.4vmin); background-color: white; border: 0px solid #999; border-radius: 1em; filter: drop-shadow(0.2em 0.2em 0.2em rgba(0, 0, 0, 0.4)); user-select: unset; z-index: 2; }
.speechbubble::before { content: ""; position: absolute; width: 1em; height: 0.6em; top: calc(100% - 1px); left: 0; background: white; clip-path: polygon(100% 0%, 20% 0%, 0% 100%); transform: translateX(calc(var(--horn_x))); }


kbd { display: inline-block; margin: 0.1em; padding: .2em 0.5em; color: #333; background-color: #ddd; font-size: 0.9em; box-shadow: 0 .2em #999; border-radius: var(--br); font-family: Verdana, Geneva, Tahoma, sans-serif; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: default; }
.btn_play_build { background-color: var(--color_main); width: 10em; text-align: center; text-transform: uppercase; letter-spacing: .1em; font-size: 1em; }
.btn_play_build:hover { background-color: var(--color_compl); color: var(--color_main_dark); }

/* exercise banner */
.gambu_exercise_box { color: white; position: relative; font-size: min(1em, 3.6vw); z-index: 2; padding: 0; transform-origin: center; display: flex; justify-content: center; line-height: 1.2; min-height: 1.2em; display: none; }
.game_wrapper.blurred { filter: blur(3px); }
.game_wrapper.blurred * { pointer-events: none !important; }
.gambu_exercise_box .gambu_exercise_text { width: 100%; position: relative; display: flex; padding: .25em 1em; background-color: var(--color_main); transform: none; justify-content: center; align-items: center; height: max-content; }
.gambu_exercise_box.start .gambu_exercise_text { left: 0; padding: .8em 10%; cursor: pointer;
    transform: translateY(calc(var(--max_height) / 2 - var(--exercise_height) - var(--size_header))) scale(1.2); 
}
.gambu_exercise_box.start.splash .gambu_exercise_text { transform: translateY(calc(var(--max_height) - 47vh)) scale(1.2); }
.gambu_exercise_box .gambu_exercise_text em { font-size: 1.4em; margin-right: .2em; line-height: 1; align-self: flex-start; }

.mobile_menus { display: none; }

.keys_wrapper { text-align: center; align-self: flex-end; }
.touch_keys { display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); touch-action: none; padding: .3em; gap: .1em; }
.touch_keys button { padding: .2em .4em; font-size: 1.1em; display: flex; align-items: center; justify-content: center; background-color: #ddd; color: #333; outline: none; }
.touch_keys button:nth-child(1), .touch_keys button:nth-child(3) { color: #ddd; background-color: unset; }
.touch_keys button:nth-child(1) em { rotate: -45deg; }
.touch_keys button:nth-child(3) em { rotate: 45deg; }

.gambu_reload_btn { display: none; --shadow_color: #4d4d4d; position: absolute; left: 0.2em; top: 0.2em; color: white; text-shadow: 1px 0 1px var(--shadow_color), 0px 1px 1px var(--shadow_color), -1px 0px 1px var(--shadow_color), 0px -1px 1px var(--shadow_color); font-size: 1.2em; line-height: 1; cursor: pointer; }
.gambu_reload_btn:hover { color: var(--color_compl); }

/* ASSETS  */
.assets_dialog { --assets_menu_h: 1.8em; --assets_header_h: 1.6em; display: none; position: absolute; left: 1em; bottom: 0.6em; width: calc(100% - 2em); height: calc(100% - 1.2em - var(--exercise_height)); padding-top: calc(1.6em + var(--assets_menu_h)); background-color: white; border: solid 2px var(--color_main_light); border-radius: var(--br); box-shadow: 0.1em 0.1em 0.4em var(--color_main_darker); z-index: 3; }
.assets_dialog_header { position: absolute; left: 0; top: 0; width: 100%; height: var(--assets_header_h); font-size: 1em; text-align: center; line-height: 1.4; color: black; background-color: var(--color_main_light); text-transform: uppercase; letter-spacing: 0.1em; color: black; }
.assets_close_btn.button_close { position: absolute; right: 0; top: 0em; height: 1em; color: black; font-size: 1.4em; padding: 0; }
.assets_close_btn.button_close:hover { background-color: transparent !important;  color: var(--color_compl) !important; }
.assets_menu { --color_tab_border: var(--color_main); display: flex; background-color: var(--color_main_lightest); justify-content: center; position: absolute; width: 100%; top: var(--assets_header_h); height: var(--assets_menu_h); border-bottom: solid 1px var(--color_tab_border); }
.assets_menu span { margin: 0 10%; cursor: pointer; width: max(15%, 5em); text-align: center; margin-top: 0.2em; line-height: 1.4; font-weight: bold; color: var(--color_main_dark); border-left: var(--color_tab_border) solid 1px; border-top: var(--color_tab_border) solid 1px; border-right: var(--color_tab_border) solid 1px; transform: translateY(1px); --color_tab_border: transparent; }
.assets_menu span.asset_type_active { font-weight: bold; color: var(--color_main); background: white; border-radius: 0.3em 0.3em 0 0; --color_tab_border: var(--color_main); }
.assets_section.asset_type_active { display: flex; }
.assets_section { max-height: 100%; width: 100%; display: flex; flex-wrap: wrap; padding: .3em; overflow: auto; align-items: flex-start; }
.assets_section { display: none; }
.asset_info_top { padding-top: .3em; text-align: center; flex: 0 0 100%; }
.assets_info_dialog { display: none; position: absolute; font-size: .9em; left: calc(50% - min(10em, 45%)); top: 40%; width: min(20em, 90%); padding: .5em; background: white; border-radius: var(--br); border: solid 2px var(--color_main_light); box-shadow: .1em .1em 0.2em; }
.assets_info_dialog .button { margin: .5em auto 0; display: block; width: 6em; }
.assets_info_dialog > div:first-child > div:first-child { margin-top: -0.5em; margin-left: -.5em; background: var(--color_main_light); width: calc(100% + 1em); padding: 0.1em 0.5em; color: black; }
.asset_texture_box { flex: 0 0 calc(25% - .6em); margin: .3em; background-color: var(--color_main_lighter); border-radius: var(--br); padding: .5em; display: flex; flex-wrap: wrap; justify-content: space-evenly; }
.asset_texture_box > div:first-child { text-align: center; margin-bottom: .3em; font-size: .9em; }
.asset_texture_box canvas { position: relative; width: 3em; height: 3em; object-fit: contain; margin: .3em; }
.asset_texture_box canvas, .user_texture.texture_img_box img, .image_bg_chess { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" style="opacity: 0.7;" viewBox="0 0 10 10"><rect x="0" y="0" width="5" height="5" fill="lightgrey" /><rect x="5" y="0" width="5" height="5" fill="white" /><rect x="0" y="5" width="5" height="5" fill="white" /><rect x="5" y="5" width="5" height="5" fill="lightgrey" /></svg>'); background-size: 20%; }
.user_texture { border: dashed 2px var(--color_main); border-radius: var(--br); background-color: var(--color_main_lightest); width: 5.5em; }
.user_texture.texture_load label div { cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; height: 100%; margin: .2em .3em; }
.user_texture.texture_load label span { font-size: .8em; }
.user_texture.texture_load:hover { background-color: var(--color_compl); }
.user_texture.texture_img_box { position: relative; display: flex; justify-content: space-evenly; align-items: center; border-color: var(--color_main_effect); border-style: solid; background: white; }
.user_texture.texture_img_box img { width: 3em; height: auto; display: block; }
.user_texture.texture_img_box em { cursor: pointer; }
.user_texture.texture_img_box em:hover { color: var(--color_main_effect); }
.asset_texture_box[data-key="bg"] { justify-content: center; column-gap: 1em; }
.asset_texture_box[data-key="bg"] > img { margin: .3em; }
.user_texture[data-key="bg"] .icon-picture::before { font-size: 2em; }
.user_texture[data-key="bg"] img { flex-basis: 200px; }
.asset_texture_box[data-key="bg"] canvas, .user_texture.texture_img_box[data-key="bg"] img { background-size: 12px; }
.texture_warn_mark { position: absolute; right: -0.4em; top: -0.4em; width: 0.8em; height: 0.8em; background: white; border-radius: 50%; cursor: pointer; }
.texture_warn_mark::before { content: "\3b"; font-family: "icons"; line-height: 1; position: absolute; left: 0; top: 0; color: var(--color_wrong); position: absolute; left: -.1em; top: -.1em; }
.texture_warn_mark > div { display: none; position: absolute; font-size: .8em; width: 12em; right: -2.3em; top: 100%; background: white; padding: 0.2em; z-index: 2; border-radius: .3em; box-shadow: 0em 0em 0.7em black; }
.texture_warn_mark:hover > div { display: block; }
.asset_sound_box { flex: 0 0 calc(33% - .52em); background-color: var(--color_main_lighter); margin: .3em; padding: .3em; border-radius: var(--br); }
.asset_sound_box .asset_description { text-align: center; }
.asset_sound { width: 6em; height: 3.4em; margin: 0 auto; border: dashed 2px var(--color_main); border-radius: var(--br); }
.asset_sound.sound_load { background-color: var(--color_main_lightest); }
.asset_sound.sound_load:hover { background-color: var(--color_compl); }
.asset_sound.sound_load label div { font-size: .8em; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; height: 100%; margin: .2em .3em; }
.asset_sound.sound_load label span { font-size: .8em; }
.asset_sound_load::before { font-size: 2em; }
.asset_sound.loaded_sound { display: flex; justify-content: space-evenly; align-items: center; border-color: var(--color_main_effect); border-style: solid; background-color: white; }
.loaded_sound .icon-delete-s:hover { color: var(--color_main_effect); cursor: pointer; }
.asset_play_btn { font-size: 1.6em; color: var(--color_main); cursor: pointer; }
.asset_play_btn.icon-stop { color: var(--color_main_effect) !important; }
.asset_play_btn:hover { color: var(--color_compl); cursor: pointer; }
.asset_cc { font-size: .7em; text-align: left; margin: 0 auto .3em; padding: .3em 1em; width: fit-content; max-width: calc(100% - 2em); border-radius: .2em; background-color: #eee; }
.asset_cc a { white-space: nowrap; }
.asset_user { flex: 0 0 100%; font-size: .7em; width: 100%; text-align: center; margin-top: .5em; }
/* user element textures */ 
.element_grp rect, .element_grp circle { stroke: transparent; }
.element_selected circle, .element_selected rect { stroke: red; }

.contribution_box { position: absolute; top: calc(100% + 3px); left: 50%; display: flex; z-index: 2; line-height: 1.2; justify-content: center; font-size: min(.8em, 1.8vw); transform: translateX(-50%); min-width: 100%; width: calc(100vw - var(--horizontal_padding) * 2); column-gap: .5em; }
.contri_cat_box { flex: 0 0 min(calc(33% - 0.5em), 25em); font-size: 1em; padding: 0.1em 0.3em; background: #fff; border-radius: 0.2em; overflow: hidden; border: solid 1px #dddddd; }

.contri_rating_box { display: flex; align-items: flex-end; column-gap: 0.4em; line-height: 1; min-height: 1.2em; }

.contri_cat_lbl { font-weight: bold; }
.contri_users { font-size: .9em; overflow-x: auto; }
.contri_users span { white-space: nowrap;}
/* .cat_rate { display: inline-block; }
.cat_rate_down { transform: scaleY(-1); } */
.contri_stars_box { width: 5.6em; display: inline-block; }
.contri_stars_box svg { display: block; --color_stars: #ffb007; }
.contri_stars_box svg rect, .contri_stars_box svg path { pointer-events: none; }
.contri_stars_box svg rect:first-of-type { fill: var(--color_stars); }
.contri_stars_box svg rect:last-of-type { fill: #FF5722; }
.star_stroke { stroke-width: 2.4px; fill: none; stroke: var(--color_stars); }
.star_mask_avg { fill: #fff; }
.star_mask_my { fill: #fff; stroke-opacity: .5; fill-opacity: .3; stroke: #fff; stroke-width: 2.4px; }

.contri_avg, .contri_rated { font-size: .8em; line-height: 1.2; min-width: 1.5em; text-align: right; }
.contri_rated { text-align: left; }

.contri_thumbs { display: inline-block; display: none; }

/* st-ar { width: 1em; height: 1em; display: inline-block; background: yellow; clip-path: polygon(0% 40%, 40% 40%, 50% 0%, 60% 40%, 100% 40%, 70% 60%, 85% 100%, 50% 73%, 15% 100%, 30% 60%); } */

@media screen and (max-width: 600px) {
    .assets_dialog { left: 0; width: 100%; font-size: .9em; }
    .asset_texture_box { flex: 0 0 calc(50% - .6em); }
    .asset_sound_box { flex: 0 0 calc(50% - .6em); }
}

.splashscreen { position: absolute; z-index: 2; width: 100%; height: 100%; left: 0; top: 0; display: none; backdrop-filter: blur(5px); }
.splashscreen picture { display: block; width: 90%; height: 90%; left: 5%; position: relative; }
.splashscreen img { width: 100%; height: 100%; object-fit: contain; }

/* konsole */ 
.gambu_toggle_log { display: none; position: absolute; left: .2em; bottom: 0.2em; width: .7em; filter: drop-shadow(1px 0px 1px var(--shadow_color)) drop-shadow(-1px 0px 1px var(--shadow_color)); --shadow_color: #616161; font-size: 1.2em; cursor: pointer; transition: transform .3s; z-index: 6; transform: rotate(180deg); }
.gambu_toggle_log svg { display: block; width: 100%; height: 100%; }
.gambu_toggle_log svg polyline { stroke: white; stroke-width: 3px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gambu_toggle_log.log_open { transform: rotate(0); }
.gambu_log_wrapper { display: none; position: absolute; top: calc(100% - 1.4em); left: 0em; width: calc(100% - 0em); z-index: 5; background-color: var(--color_main_dark); padding: .2em .3em .3em .3em; border-radius: var(--br); }
.gambu_log_wrapper_title { display: flex; justify-content: space-between; font-size: .8em; }
.gambu_log_wrapper_title > span { color: white; padding-left: 1.3em; --shadow_color: #666; }
.gambu_log_wrapper_title > em { color: white; cursor: pointer; }
.gambu_log { font-family: var(--font_mono); border: dashed 1px white; padding: 0.4em 0.6em; height: 7em; overflow: auto; background: black; color: #d5ff2d; font-size: 0.7em; }


@media screen and (max-width: 700px) {
    .main_ui { height: 5.5em; font-size: min(1.1rem, 4.5vw); }
    .builder_ui { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr var(--mm_width); grid-template-rows: 100%; background-color: var(--color_main_lightest); --mm_width: 3em; }
    .bottom_ui { font-size: 1rem; background-color: transparent; }
    .buildmode .bottom_ui { background-color: var(--color_main_lightest); }
    .tile_info_box { display: none; }
    .player_preview { display: none; }
    .mobile_menus { z-index: 1; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: 100%; row-gap: .3em; background-color: var(--color_main_lightest); margin-right: -.3em; padding-right: .3em; }
    .mobile_menus em { font-size: 1.3em; display: flex; align-items: center; flex-direction: column; justify-content: center; border-radius: var(--br); background: var(--color_main_lighter); }
    .mobile_menus em.mm_active { background-color: #cecece; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
    .file_buttons, .world_settings { opacity: 0; z-index: 0; position: absolute; right: calc(var(--mm_width) + .16em); top: .16em; height: calc(100% - 0.32em); transform: translate(100%, 0); transition: transform .3s, opacity .3s; background: #cecece; }
    .world_settings { justify-content: space-evenly; column-gap: unset; min-width: 17em; z-index: 1; }
    .world_settings > div { font-size: .95em; }
    .file_buttons { width: min(240px, 80%); display: grid; grid-auto-rows: minmax(0, 1fr); padding: 0.5em; gap: .3em; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .file_buttons .button { font-size: .9em; }
    .file_buttons.mm_open, .world_settings.mm_open { opacity: 1; transform: translate(0, 0); border-top-right-radius: 0; border-bottom-right-radius: 0; }
    .menu_2nd_lvl { background-color: inherit; padding: 0 0.2em 0.2em; border-radius: var(--br); display: grid; grid-auto-rows: minmax(0, 1fr); row-gap: .1em; align-items: center; justify-content: center; }
    .menu_2nd_lvl .header_2nd_lvl { font-size: .8em; }
    .touch_keys button { font-size: 1.2em; background-color: #ddd; color: #333; outline: none; }
    .help_panel { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
    .help_panel > .button:first-child { grid-row: 1 / span 3; width: 80%; place-self: center; } 
    
    /* contributors & rating */
    /* .pixi { position: unset !important; } */
    .game_ui { padding-top: unset; margin-top: 1em; z-index: 3; }
    .contribution_box { position: absolute; bottom: calc(0% - 1em); top: unset; left: 10%; justify-content: center; font-size: min(0.8em, 4vw); width: 80%; min-width: 80%; flex-direction: column; transform: translateY(100%); transition: transform .4s; pointer-events: none; }
    .contribution_box::before { content: "Mitwirkende"; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background-color: white; pointer-events: all; transition: opacity .2s; }
    .contri_cat_lbl { width: 50%; }
    .contribution_box:hover::before { opacity: 0; }
    .contribution_box:hover { transform: translateY(0); opacity: 1; pointer-events: all;}
    .contribution_box > div { height: 0px; opacity: 0; transition: opacity .2s, height .2s; }
    .contribution_box:hover > div { opacity: 1; height: 100%; transition: opacity .4s .2s }
    
}

/* cp adjustments */
.cp .gambu_wrapper { position: relative; width: 100%; max-width: var(--content_width); }
.cp .game_wrapper { width: 100%; border-radius: var(--br); position: relative; }
.cp .pixi { height: var(--game_height); width: 100%; }
.cp .bottom_ui { display: none !important; }
.cp .game_message { font-size: 1em; }
.cp .game_message.msg_bot_fight { top: calc(100% - 4.5em); }
.cp .gambu_wrapper .main_ui { height: unset; }
.cp .gambu_wrapper .main_ui .game_ui { padding: unset; margin: unset; }
.cp .gambu_wrapper .main_ui .game_ui .second_line { text-align: center; }

/* pm adjustments */
.pm .gambu_wrapper { position: relative; color: #333; font-size: .7em; }
.pm .game_wrapper { width: 100%; height: var(--game_height); padding: 0; position: relative; }
.pm .main_ui, .pm .bottom_ui { display: none !important; }
.pm .game_message { font-size: .9em; }
.pm .gambu_reload_btn { font-size: .8em; }
.pm .game_message.msg_bot_fight { top: calc(100% - 4.5em); }
.pm .bot_panel { font-size: .8em; }

/* manual */
.manual_dialog { position: fixed; width: min(800px, 90%); left: calc(50% - min(450px, 45%)); display: none; height: min(800px, 90%); top: calc(50% - min(800px, 45%)); background: var(--color_bg); box-shadow: .1em .1em 0.5em; border-radius: var(--br); overflow: hidden; z-index: 102; }
.manual_header { padding: .2em 1em; background-color: #004d83; color: white; position: relative; height: 1.8em; cursor: grab; }
.manual_dialog .button_close { position: absolute; right: 0; top: 0em; height: 100%; color: black; font-size: 1.4em; padding: 0; width: unset; transform: none; color: var(--color_main); background-color: transparent; border: none; color: white; line-height: 100%; }
.manual_dialog .button_close:hover { background-color: transparent !important; color: var(--color_compl) !important; }
.manual_content { position: relative; height: calc(100% - 1.8em); overflow-y: auto; }
.manual_dialog .ui-resizable-handle { position: absolute; right: 0.2em; bottom: 0.1em; line-height: 1; font-size: 0.8em; }