/* Lobby.unr/H5Creation windows: native texture art, restrained Arial controls. */
#lobby-scene { position: fixed; inset: 0; background: #000; }
.lobby-canvas { display: block; width: 100%; height: 100%; }
/* Startup and world-entry loading use the launcher's Kamael key art; native textures stay in-game. */
#lobby-scene[data-loading='true']::after, .screen-loading, #lobby-scene[data-static='true'] { background: linear-gradient(0deg, #080503 0%, rgb(8 5 3 / .25) 42%, rgb(8 5 3 / .05) 70%), linear-gradient(90deg, rgb(8 5 3 / .65), transparent 52%), #080503 url('../img/loading-kamael.jpg') 72% center / cover no-repeat; }
#lobby-scene[data-static='true'] .lobby-canvas { display: none; }
@media (max-aspect-ratio: 1 / 1) {
	#lobby-scene[data-loading='true']::after, .screen-loading, #lobby-scene[data-static='true'] { background-image: linear-gradient(0deg, #080503 0%, rgb(8 5 3 / .3) 42%, rgb(8 5 3 / .05) 70%), linear-gradient(90deg, rgb(8 5 3 / .3), transparent), url('../img/loading-kamael-mobile.jpg'); background-position: 0 0, 0 0, 58% center; }
}
#lobby-scene[data-loading='true']::after { content: ''; position: absolute; inset: 0; }
.lobby-screen { z-index: 1; background: none; font: 12px/1.4 Arial, sans-serif; color: #e5e1c8; pointer-events: none; }
.lobby-screen::before { display: none; }
.lobby-screen button, .lobby-screen input, .lobby-screen select, .lobby-screen form, .lobby-screen dialog, .native-select, .native-server { pointer-events: auto; }
.lobby-screen h2 { font: 400 22px/1.3 Arial, sans-serif; color: #ffffd8; text-shadow: 1px 2px 2px #000; }
.native-heading { position: absolute; top: 12px; left: 22px; }
/* btn1_normal art is 76x23 at the origin of a 128x32 texture. */
.lobby-button { min-height: 26px; min-width: 100px; padding: 4px 14px; border: 0; border-radius: 0; background: url('../assets/lobby/ui/btn1_normal.png') 0 0 / 168.421% 139.13% no-repeat; color: #e5e1c8; font: 12px/1.3 Arial, sans-serif; text-shadow: 1px 1px #000; white-space: nowrap; cursor: pointer; }
.lobby-button:disabled { opacity: .45; cursor: default; }
.lobby-button:active:not(:disabled) { background-image: url('../assets/lobby/ui/btn1_normalon.png'); transform: translateY(1px); }
.lobby-button:focus-visible, .lobby-screen :focus-visible { outline: 2px solid #e5c68b; outline-offset: 2px; }
/* LoginBtn art is 108x32 at (6, 7) in a 128x64 texture. */
.lobby-button.login-button { background-image: url('../assets/lobby/ui/LoginBtn.png'); background-size: 118.519% 200%; background-position: 30% 21.875%; }
.lobby-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.lobby-music { position: fixed; z-index: 5; right: 14px; top: 12px; }
.lobby-brand { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); }
.lobby-brand img { width: clamp(130px, 18vh, 220px); height: auto; }
.lobby-interlude { position: absolute; top: 8px; left: 12px; width: 145px; height: 145px; object-fit: contain; }
.native-login { position: absolute; top: 53%; left: 50%; transform: translateX(-50%); width: 256px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; color-scheme: dark; }
/* editboxlogin art is 247x27 at (4, 3) in a 256x64 texture; its label plate ends at 26.7%. */
.native-login-field { display: grid; grid-template-columns: 26.7% minmax(0, 1fr); align-items: center; height: 27px; background: url('../assets/lobby/ui/editboxlogin.png') 44.444% 8.108% / 103.644% 237.037% no-repeat; }
.native-login-field label { padding-right: 7px; color: #e5e1c8; text-align: right; text-shadow: 1px 1px #000; }
.native-login-field input { appearance: none; min-width: 0; width: calc(100% - 9px); height: 100%; border: 0; border-radius: 0; padding: 0 6px; background: transparent; color: #fff; caret-color: #e5e1c8; font: 12px Arial, sans-serif; }
.native-login-field input:focus-visible { outline: 1px solid #e5c68b; outline-offset: -4px; }
.native-login-field input[aria-invalid='true'] { outline: 1px solid #ffd0bd; outline-offset: -4px; }
/* Browser autofill must not paint a box over the native editbox art: delay its background color indefinitely. */
.native-login-field input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #e5e1c8; transition: background-color 600000s 0s, color 600000s 0s; }
.native-login-field input:autofill { -webkit-text-fill-color: #fff; caret-color: #e5e1c8; transition: background-color 600000s 0s, color 600000s 0s; }
.native-remember { display: flex; gap: 6px; align-items: center; justify-self: center; min-height: 28px; color: #e5e1c8; text-shadow: 1px 1px #000; }
.native-remember input { appearance: none; flex: 0 0 16px; width: 16px; height: 16px; margin: 0; border: 0; border-radius: 0; background: url('../assets/lobby/ui/CheckBox.png') center / 16px 16px no-repeat; }
.native-remember input:checked { background-image: url('../assets/lobby/ui/CheckBox_Checked.png'); }
.native-login .login-button { justify-self: center; width: 112px; height: 33px; margin-top: 2px; }
.native-login .login-button:active:not(:disabled) { background-image: url('../assets/lobby/ui/LoginBtnOn.png'); background-size: 115.315% 188.235%; background-position: 29.412% 20%; }
.lobby-copyright { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: min(760px, 90vw); height: auto; }
.lobby-error { padding: 8px; color: #ffd0bd; background: rgb(20 10 5 / .9); overflow-wrap: anywhere; }
#lobby-status { position: fixed; z-index: 4; left: 50%; top: 18%; transform: translateX(-50%); width: min(460px, 90vw); padding: 10px; background: #191710; color: #ffd0bd; font: 13px Arial, sans-serif; }
#lobby-status[data-state='loading'] { top: auto; bottom: 18px; width: max-content; max-width: 90vw; text-align: center; color: #eee1ad; background: #181b16 url('../assets/lobby/ui/system_back.png') center / 100% 100%; border: 1px solid #746d52; }
/* ServerListWnd: full-width EulaBG band, native title art and a striped 10-row list. */
.screen-server { display: grid; place-items: center; }
.screen-server::before { content: ''; display: block; position: absolute; left: 0; right: 0; top: 50%; height: min(520px, 76vh); transform: translateY(-46%); background: url('../assets/lobby/ui/Eulabg.png') center / 100% 162% no-repeat; opacity: .72; pointer-events: none; }
.native-server { position: relative; display: grid; justify-items: center; gap: 12px; width: min(300px, calc(100vw - 24px)); margin-top: 72px; }
.native-server h2 { font: 400 20px/1.3 Tahoma, Arial, sans-serif; color: #fff4dc; text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000, 1px 2px 3px #000; }
.server-table { width: 100%; padding: 4px; border: 1px solid #1d1c1a; outline: 1px solid #4d4638; background: rgb(8 8 9 / .82); }
.server-head, .server-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 70px 64px; align-items: center; }
.server-head { height: 16px; border-bottom: 1px solid #5d5440; background: linear-gradient(#4b4232, #2a251d); color: #e5e1c8; font: 11px Arial, sans-serif; text-align: center; }
.server-head span + span { border-left: 1px solid #1b1813; }
.server-list { display: block; height: 208px; overflow-y: auto; background: repeating-linear-gradient(#1b1c1d 0 16px, #0b0b0c 16px 32px); scrollbar-color: #6b604a #111; }
.server-row { width: 100%; min-height: 16px; border: 0; padding: 0; background: transparent; color: #e5e1c8; font: 11px/16px Arial, sans-serif; text-align: center; cursor: pointer; }
.server-row span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.server-row span:nth-child(2) { text-align: left; padding-left: 4px; }
.server-row .server-state { color: #6fb7ff; }
.server-row[aria-pressed='true'] { background: url('../assets/lobby/ui/TextSelect.png') center / 100% 100%; }
.server-row:disabled { opacity: .55; cursor: default; }
.server-row:disabled .server-state { color: #d07a6a; }
#server-status { min-height: 18px; color: #e5e1c8; text-shadow: 1px 1px #000; text-align: center; }
.native-server .lobby-button { width: 88px; min-width: 0; height: 24px; }
.screen-select { display: block; }
.native-select { position: absolute; left: 15px; top: 44px; width: 256px; height: 128px; padding: 0; overflow: visible; background: url('../assets/lobby/ui/select1_back.png') left top / 256px 128px no-repeat; font: 11px/16px Arial, sans-serif; }
.char-choice-label { position: absolute; top: 8px; left: 3px; }
.native-select .char-list { position: absolute; z-index: 2; top: 7px; left: 46px; width: 126px; height: 16px; margin: 0; padding: 0; border: 1px solid #5c5846; border-radius: 0; background: #171719; overflow: hidden; display: block; }
.native-select .char-list[data-open='true'] { height: auto; max-height: min(250px, 50vh); overflow-y: auto; box-shadow: 0 6px 12px #0009; }
.native-select .char-list:not([data-open='true']) .char:not([aria-selected='true']) { display: none; }
.native-select .char { display: block; min-height: 16px; padding: 0 3px; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.native-select .char[aria-selected='true'] { background: url('../assets/lobby/ui/TextSelect.png') center / 100% 100%; }
.native-select .char-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #eee8d8; font: 11px/16px Arial, sans-serif; }
.native-select .char-meta { display: none; }
#char-toggle { position: absolute; left: 172px; top: 7px; width: 16px; height: 16px; padding: 0; border: 0; background: url('../assets/ui/tex/l2ui/control/combobox1.png') center / 100% 100%; cursor: pointer; }
#char-toggle:disabled { opacity: .5; }
#char-level-class { position: absolute; top: 30px; left: 3px; max-width: 245px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #bfa86a; font: 11px/16px Arial, sans-serif; }
.native-lobby-gauge { position: absolute; height: 12px; overflow: hidden; text-align: center; color: #fff; text-shadow: 1px 1px #000; font: bold 10px/12px Arial, sans-serif; letter-spacing: .03em; }
.native-lobby-gauge i { position: absolute; left: 0; top: 0; height: 100%; background-size: 100% 100%; }
.native-lobby-gauge span { position: relative; }
.native-lobby-gauge.hp { left: 24px; top: 54px; width: 98px; }
.native-lobby-gauge.hp i { background-image: url('../assets/ui/tex/l2ui_ch3/statuswnd/statushpcenter_gauge.png'); }
.native-lobby-gauge.mp { left: 24px; top: 74px; width: 98px; }
.native-lobby-gauge.mp i { background-image: url('../assets/ui/tex/l2ui_ch3/statuswnd/statusmpcenter_gauge.png'); }
.native-lobby-gauge.xp { left: 24px; top: 94px; width: 225px; }
.native-lobby-gauge.xp i { background: #6a5934; }
#select-sp, #select-karma { position: absolute; left: 172px; width: 77px; padding-right: 3px; height: 12px; text-align: right; color: #c7b071; line-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#select-sp { top: 54px; }
#select-karma { top: 74px; }
.native-karma-label { position: absolute; left: 136px; top: 73px; }
#char-details { position: absolute; top: 130px; left: 0; width: 256px; padding: 6px; background: #171914ed; border: 1px solid #746d52; font: 11px/1.5 Arial, sans-serif; overflow-wrap: anywhere; }
.native-select .empty-note { position: absolute; top: 20px; left: 0; width: 256px; min-height: 108px; margin: 0; padding: 16px; background: #171914; color: #e5e1c8; }
.native-bottom { position: absolute; bottom: 0; left: 0; right: 0; min-height: 64px; padding: 20px 16px 10px; background: url('../assets/lobby/ui/lobby_bottom.png') center bottom / 100% 100%; }
.native-bottom .select-start { display: block; width: 128px; height: 27px; margin: 0 auto; }
.native-bottom > .lobby-actions { position: absolute; right: 12px; bottom: 10px; }
.native-bottom > .lobby-actions .lobby-button { width: 116px; min-width: 0; height: 27px; padding-inline: 8px; }
.select-error { position: absolute; left: 20px; bottom: 80px; max-width: min(500px, 90vw); }
.native-create { position: absolute; top: 75px; left: 32px; width: 265px; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 7px 8px; align-items: center; padding: 18px; border: 1px solid #665f49; background: url('../assets/lobby/ui/select2_back.png') center / 100% 100%; }
.native-create input, .native-create select { width: 100%; min-width: 0; height: 24px; padding: 2px 4px; border: 1px solid #595744; border-radius: 0; background: #171819; color: #e5e1c8; font: 12px Arial, sans-serif; }
.native-create .lobby-error { grid-column: 1 / -1; }
.create-controls { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; }
.lobby-image-button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.lobby-image-button img { display: block; width: 100%; height: 100%; }
.lobby-dialog { width: min(420px, calc(100vw - 24px)); padding: 24px; border: 1px solid #86795b; background: #20221c url('../assets/lobby/ui/dialog_back.png') center / 100% 100%; color: #eee8cf; font: 13px/1.6 Arial, sans-serif; }
.lobby-dialog::backdrop { background: rgb(0 0 0 / .55); }
.lobby-dialog h2 { font-size: 20px; }
.lobby-dialog p { margin: 16px 0 24px; overflow-wrap: anywhere; }
.screen-loading { display: grid; place-content: end center; justify-items: center; gap: 10px; padding-bottom: max(64px, 12vh); }
.screen-loading .loading-text { padding: 7px 18px; border: 1px solid #5d5440; background: rgb(8 5 3 / .82); color: #f0dfb2; font: 13px/1.3 Arial, sans-serif; letter-spacing: 0; text-shadow: 1px 1px #000; }
.screen-loading .loading-bar { width: min(360px, 80vw); height: 6px; border-color: #6d6045; }
@media (hover: hover) and (pointer: fine) {
	.lobby-button:hover:not(:disabled) { background-image: url('../assets/lobby/ui/btn1_normalon.png'); }
	.lobby-button.login-button:hover:not(:disabled) { background-image: url('../assets/lobby/ui/LoginBtn_over.png'); background-size: 115.315% 188.235%; background-position: 29.412% 20%; }
	.server-row:hover:not(:disabled):not([aria-pressed='true']) { background: rgb(229 198 139 / .12); }
	.native-select .char:hover { border-color: #77724e; }
}
@media (max-width: 760px) {
	.lobby-button { min-height: 44px; }
	.native-heading { left: 12px; top: 58px; font-size: 19px !important; }
	.lobby-brand { top: 7%; }
	.native-login { top: 45%; }
	.native-login-field { height: 40px; }
	.native-login-field input { height: 32px; font-size: 16px; }
	.native-remember { min-height: 36px; }
	.native-select { left: 12px; top: 94px; }
	.native-select .char-list { height: 36px; top: 0; width: 162px; }
	.native-select .char { min-height: 36px; padding: 10px 3px; }
	#char-toggle { left: 208px; top: 0; width: 36px; height: 36px; }
	#char-level-class { top: 36px; }
	.native-bottom { display: grid; gap: 8px; padding: 12px; }
	.native-bottom > .lobby-actions { position: static; flex-wrap: wrap; }
	.native-bottom .select-start { width: 100%; }
	.native-bottom .lobby-button { min-width: 80px; padding: 4px 9px; }
	.native-create { left: 12px; top: 94px; width: min(275px, calc(100vw - 24px)); padding: 10px; gap: 6px; max-height: calc(100% - 270px); overflow-y: auto; }
	.native-create input, .native-create select { min-height: 36px; font-size: 16px; }
	.create-controls { bottom: 16px; }
	.lobby-image-button { width: 44px; height: 44px; }
	.select-error { bottom: 150px; }
}
@media (max-height: 550px) and (min-width: 761px) {
	.lobby-brand { top: 0; }
	.lobby-brand img { width: 130px; }
	.native-login { top: 38%; }
	.create-controls { bottom: 12px; }
	.native-create { top: 55px; max-height: calc(100% - 80px); overflow: auto; }
}
