/* Asia splash: original PSD layers, live HTML progress, responsive composition. */
.uk-loading-invite {
 box-sizing: border-box; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
 margin: auto; padding: 0; border: 2px solid #724529; border-radius: 24px;
 overflow: auto; background: #fffbef; color: #4c3023; touch-action: pan-y;
 box-shadow: 0 12px 0 #70401324, 0 24px 80px #43201440;
 font: 500 16px/1.6 "Trebuchet MS", Meiryo, "Microsoft YaHei", system-ui, sans-serif;
}
.uk-loading-invite::backdrop { background: #42271399; backdrop-filter: blur(5px); }
.uk-invite-accent { height: 12px; background: repeating-linear-gradient(90deg, #ed593c 0 26px, #ffd66c 26px 52px); }
.uk-invite-content { padding: clamp(22px, 5vw, 36px); text-align: center; }
.uk-invite-dest { display: inline-flex; align-items: center; gap: 9px; padding: 5px 16px; border-radius: 999px; background: #ffedcb; color: #894020; font-weight: 800; }
.uk-invite-dest span { font-size: 24px; line-height: 1; }
.uk-loading-invite h2 { margin: 20px 0 10px; font-size: clamp(24px, 5vw, 32px); line-height: 1.25; letter-spacing: -.025em; }
.uk-loading-invite #uk-invite-message { margin: 0 0 25px; font-size: 18px; }
.uk-invite-actions { display: grid; gap: 12px; }
.uk-invite-actions button { width: 100%; min-height: 52px; box-sizing: border-box; padding: 12px 18px; border: 2px solid #73462b; border-radius: 14px; font: inherit; font-weight: 800; line-height: 1.4; cursor: pointer; touch-action: manipulation; }
.uk-invite-go { background: #e35236; color: #fff; box-shadow: 0 4px 0 #a63724; }
.uk-invite-stay { background: #fff5dc; color: #4c3023; box-shadow: 0 3px 0 #dcc3a0; }
.uk-invite-actions button:hover { filter: brightness(1.04); }
.uk-invite-actions button:active { transform: translateY(2px); box-shadow: none; }
.uk-invite-actions button:focus-visible { outline: 3px solid #176d83; outline-offset: 4px; }
.uk-loading-invite #uk-invite-countdown { margin: 24px 0 6px; color: #9a3b24; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.uk-loading-invite .uk-invite-once { margin: 0; color: #795d4a; font-size: 13px; }
html, body {
 margin: 0; width: 100%; height: 100%; position: absolute;
 background: #ffd34e; user-select: none; touch-action: none; overflow: hidden;
}
#screen { width: 100%; height: 100%; margin: 0; padding: 0; background-size: 30vh; }
#screen.pattern-bg { background: #ffd34e url("../../assets/img/asia-splash/background.webp") center / cover no-repeat; }
#assets, #browse { display: none; }
html:has(.splash-loader, .boot-error-visible), body:has(.splash-loader, .boot-error-visible) { touch-action: pan-y; }

.splash-loader {
 --splash-ink: #694328;
 position: absolute; inset: 0; z-index: 5; overflow: hidden; isolation: isolate;
 background: #ffd34e url("../../assets/img/asia-splash/background.webp") center / cover no-repeat;
 color: var(--splash-ink); font-family: "Trebuchet MS", "Microsoft YaHei", Meiryo, system-ui, sans-serif;
}
.splash-scene, .splash-foreground {
 position: absolute; left: 50%; top: 50%;
 width: 100%; height: 100%;
 transform: translate(-50%, -50%); pointer-events: none;
}
.splash-scene { z-index: 0; }
.splash-foreground { z-index: 3; }
.splash-scene > div, .splash-foreground > div {
 position: absolute; background: center / contain no-repeat;
}
.splash-scene .splash-clouds {
 left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 1672 / 155;
 background-image: url("../../assets/img/asia-splash/clouds.webp");
}
.splash-scene .splash-daruma {
 left: 2.57%; top: 4.25%; width: 19.5%; height: 36.35%;
 background-image: url("../../assets/img/asia-splash/daruma.webp");
}
.splash-scene .splash-cat {
 right: 1.26%; top: 0.64%; width: 19.56%; height: 49.31%;
 background-image: url("../../assets/img/asia-splash/lucky-cat.webp");
}
.splash-scene .splash-top-red {
 left: 0; top: 49.95%; width: 43.54%; height: 50.05%;
 background-image: url("../../assets/img/asia-splash/top-red.webp");
}
.splash-scene .splash-top-blue {
 right: 0; top: 62.27%; width: 54.13%; height: 37.73%;
 background-image: url("../../assets/img/asia-splash/top-blue.webp");
}
.splash-foreground .splash-don-red {
 left: 0; top: 24.87%; width: 28.89%; height: 50.05%;
 background-image: url("../../assets/img/asia-splash/don-red.webp");
 transform-origin: 50% 90%; animation: splashDonRed 4.8s ease-in-out infinite;
}
.splash-foreground .splash-don-blue {
 right: 0; top: 24.87%; width: 29.13%; height: 50.05%;
 background-image: url("../../assets/img/asia-splash/don-blue.webp");
 transform-origin: 50% 90%; animation: splashDonBlue 4.8s ease-in-out infinite;
}
.splash-panel {
 position: absolute; z-index: 2; left: 50%; top: 47.7%;
 width: min(54.07vw, 96.07vh); aspect-ratio: 904 / 514;
 transform: translate(-50%, -50%);
 background: #fff1b6 url("../../assets/img/asia-splash/paper.webp") center / 100% 100% no-repeat;
 border-radius: 12px;
 filter: drop-shadow(0 5px 3px #70401340);
}
.loader-logo {
 position: absolute; top: 10.8%; left: 12%; width: 76%; height: 52%;
 display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
 text-align: center;
}
.loader-icon {
 flex: 0 0 auto; width: 21%; aspect-ratio: 144 / 143;
 background: url("../../assets/img/asia-splash/icon.webp") center / contain no-repeat;
 animation: splashIcon 3s ease-in-out infinite;
}
.loader-kicker {
 margin-top: 2.2%; font-size: clamp(13px, 2.1vmin, 26px); font-weight: 800;
 line-height: 1.25; color: #71513c; letter-spacing: .04em;
}
.loader-title { width: 63%; margin: 0.3% 0 0; line-height: 1; color: #c24f22; }
.loader-title img { display: block; width: 100%; height: auto; }
.loader-bar-container {
 position: absolute; left: 9%; bottom: 24%; width: 82%; height: 9%;
 box-sizing: border-box; border: 1px solid #ae843e; border-radius: 999px;
 background: #fff8d4c9; overflow: hidden; box-shadow: inset 0 2px 4px #8e5e2419;
}
.splash-loader .progress {
 width: 0; height: 100%; border-radius: inherit;
 background: linear-gradient(90deg, #f32d58 0%, #ff8053 53%, #ffdb59 100%);
 box-shadow: inset 0 2px 0 #ffffff4d;
 transition: width 280ms ease-out;
}
.progress-shimmer {
 position: absolute; inset: 0; pointer-events: none; opacity: .65;
 background: linear-gradient(105deg, transparent 38%, #ffffff50 50%, transparent 62%);
 transform: translateX(-100%); animation: splashShimmer 3.6s ease-in-out infinite;
}
.percentage {
 position: absolute; inset: 0; display: grid; place-items: center;
 font: 800 clamp(15px, 2.6vmin, 28px)/1 "Trebuchet MS", system-ui, sans-serif;
 color: #47291c; font-variant-numeric: tabular-nums; pointer-events: none;
 text-shadow: 0 1px 1px #fff7dbcc;
}
.loader-status {
 position: absolute; left: 12%; bottom: 15.7%; width: 76%; min-height: 1.5em;
 display: flex; align-items: center; justify-content: center; gap: .45em;
 font-size: clamp(12px, 1.55vmin, 17px); line-height: 1.5; text-align: center;
}
.loader-status-text { overflow-wrap: anywhere; }
.loader-dots { display: inline-flex; gap: .22em; flex-shrink: 0; }
.loader-dots .dot {
 width: .28em; height: .28em; border-radius: 50%; background: currentColor;
 animation: splashDot 1.5s ease-in-out infinite;
}
.loader-dots .dot:nth-child(2) { animation-delay: 160ms; }
.loader-dots .dot:nth-child(3) { animation-delay: 320ms; }
.loader-details {
 position: absolute; z-index: 5; bottom: 2%; left: 12%; width: 76%;
 box-sizing: border-box; font-size: clamp(11px, 1.3vmin, 14px); line-height: 1.5;
 text-align: center; border-radius: 12px;
}
.loader-details summary {
 display: list-item; width: fit-content; margin: 0 auto; min-height: 44px;
 padding: 4px 12px; box-sizing: border-box; cursor: pointer;
 text-decoration: underline; text-decoration-color: #936b3970; text-underline-offset: 3px;
}
.loader-meta {
 position: absolute; bottom: calc(100% + clamp(80px, 12vh, 140px)); left: 0; width: 100%;
 display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; text-align: left;
 padding: 12px; box-sizing: border-box; border-radius: 12px;
 background: #fffbec; border: 1px solid #d3ac66; box-shadow: 0 5px 16px #79552525;
 max-height: min(28vh, 210px); overflow: auto; touch-action: pan-y;
}
.loader-meta span { min-width: 0; overflow-wrap: anywhere; }
.loader-speed, .loader-resource { grid-column: 1 / -1; }
.loader-resource:empty { display: none; }
.loader-details summary:focus-visible, .boot-error-actions button:focus-visible {
 outline: 3px solid #08737a; outline-offset: 3px;
}
.loader-notices {
 position: absolute; z-index: 6; left: 9%; top: 99%; width: 82%;
 display: grid; gap: 6px; text-align: center; font-size: clamp(12px, 1.5vmin, 16px); line-height: 1.5;
}
.loader-retry, .loader-warmup-warning {
 display: none; padding: 8px 12px; border-radius: 12px; background: #fff8e9f5;
 border: 1px solid #b57f33; box-shadow: 0 3px 12px #7d422321; overflow-wrap: anywhere;
}
.loader-warmup-warning { background: #e9fffbf5; border-color: #287b79; }
.splash-credit {
 position: absolute; z-index: 4; left: max(.6vw, env(safe-area-inset-left, 0px));
 bottom: max(0px, env(safe-area-inset-bottom, 0px));
 width: min(24.82vw, 44.1vh); height: auto;
}
#initial-loader .progress { width: 32%; animation: splashIndeterminate 1.6s ease-in-out infinite; }
#initial-loader .loader-status { bottom: 10%; }
#loader.loader-fade-out { animation: splashOut 300ms ease-out forwards; }
@keyframes splashDonRed { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1deg) translateY(-3px); } }
@keyframes splashDonBlue { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1deg) translateY(-3px); } }
@keyframes splashIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes splashShimmer { 0%, 25% { transform: translateX(-100%); } 80%, 100% { transform: translateX(100%); } }
@keyframes splashDot { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@keyframes splashIndeterminate { 0% { transform: translateX(-105%); } 100% { transform: translateX(320%); } }
@keyframes splashOut { to { opacity: 0; } }

/* Portrait gets its own composition so the drums never cover the live UI. */
@media (max-aspect-ratio: 1/1) {
 .splash-scene, .splash-foreground { width: 100%; height: 100%; }
 .splash-scene .splash-clouds { width: 180%; left: -40%; top: 0; height: auto; aspect-ratio: 1672/155; }
 .splash-scene .splash-daruma { top: 5%; left: -6%; width: 32%; height: auto; aspect-ratio: 326/342; }
 .splash-scene .splash-cat { top: 3%; right: -5%; width: 30%; height: auto; aspect-ratio: 327/464; }
 .splash-scene .splash-top-red { top: auto; bottom: 8%; left: -20%; width: 95%; height: auto; aspect-ratio: 728/471; }
 .splash-scene .splash-top-blue { top: auto; bottom: 2%; right: -24%; width: 105%; height: auto; aspect-ratio: 905/355; }
 .splash-panel {
  top: 42%; width: 94%; height: clamp(310px, 51vh, 540px); aspect-ratio: auto;
  background: #fff1b6; border: 1px solid transparent; box-sizing: border-box;
  border-image: url("../../assets/img/asia-splash/paper.webp") 190 fill / 76px / 0 stretch;
 }
 .loader-logo { top: 10%; height: 48%; }
 .loader-icon { width: clamp(65px, 23vw, 115px); }
 .loader-kicker { font-size: clamp(15px, 3.8vw, 23px); margin-top: 3%; }
 .loader-title { width: 87%; margin-top: 2%; }
 .loader-bar-container { left: 10%; width: 80%; height: 10%; bottom: 23%; }
 .percentage { font-size: clamp(19px, 5vw, 26px); }
 .loader-status { font-size: clamp(12px, 3.1vw, 17px); left: 10%; width: 80%; bottom: 16%; }
 .loader-details { font-size: clamp(12px, 2.8vw, 15px); left: 10%; width: 80%; bottom: 1.5%; }
 .loader-details summary { min-height: 44px; padding: 10px 12px; }
 .loader-notices { font-size: 12px; top: 97%; }
 .splash-foreground .splash-don-red, .splash-foreground .splash-don-blue {
  top: auto; bottom: 7.5%; width: 48%; height: auto; aspect-ratio: 483/471;
 }
 .splash-foreground .splash-don-red { left: -4%; }
 .splash-foreground .splash-don-blue { right: -4%; }
 .splash-credit { left: max(8px, env(safe-area-inset-left, 0px)); bottom: max(4px, env(safe-area-inset-bottom, 0px)); width: clamp(150px, 43vw, 240px); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 680px) {
 .splash-panel { top: 41%; height: 310px; }
 .loader-logo { top: 9%; }
 .loader-icon { width: 65px; }
 .loader-kicker { font-size: 14px; margin-top: 6px; }
 .loader-title { width: min(80%, 230px); }
 .splash-foreground .splash-don-red, .splash-foreground .splash-don-blue { width: 40%; bottom: 7%; }
 .splash-credit { width: 140px; }
}
/* Compact landscape phones keep readable text and generous side decoration. */
@media (min-aspect-ratio: 1/1) and (max-height: 500px) {
 .splash-panel { width: min(66vw, 118vh); top: 49%; }
 .loader-kicker { font-size: 12px; }
 .loader-logo { top: 7%; }
 .loader-icon { width: 17%; }
 .loader-title { width: 53%; }
 .loader-bar-container { bottom: 29%; height: 10%; }
 .loader-status { bottom: 18%; font-size: 11px; }
 .loader-details { bottom: 1%; font-size: 11px; }
 .loader-notices { top: auto; bottom: 2%; left: 10%; width: 80%; font-size: 11px; }
 .splash-credit { width: 19vw; }
}
@media (prefers-reduced-motion: reduce) {
 .splash-loader *, .splash-loader::before { animation: none !important; transition: none !important; }
 #initial-loader .progress { width: 100%; opacity: .45; }
}

#unsupportedBrowser {
	position: absolute;
	top: 12px;
	right: 12px;
	left: 12px;
	max-height: 100%;
	overflow: hidden auto;
	padding: 0.7em 3.2em 0.7em 0.75em;
	border: 2px solid #8a3528;
	border-radius: 18px;
	background: #fff9ec;
	box-shadow: 0 12px 30px rgba(48, 20, 15, 0.24);
	color: #32201c;
	font-family: var(--ui-font, TnT, Meiryo, sans-serif);
	font-size: clamp(16px, 2.2vw, 20px);
	cursor: default;
	z-index: 10;
}

#unsupportedWarn {
	display: inline-grid;
	place-items: center;
	width: 1.8em;
	height: 1.8em;
	margin-right: 0.5em;
	border: 2px solid #8a3528;
	border-radius: 50%;
	background: #e94b35;
	color: #fff;
	text-align: center;
	line-height: 1;
}

#unsupportedBrowser.hidden {
	width: 1.5em;
}

#unsupportedBrowser.hidden *:not(#unsupportedWarn) {
	display: none !important;
}

#unsupportedBrowser a {
	color: #08737a;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

#unsupportedBrowser a:hover {
	text-decoration: underline;
}

#unsupportedBrowser ul {
	margin: 0.25em;
}

#unsupportedDetails {
	display: none;
	margin: 0.5em 2.5em 0 2.5em;
	border: 2px solid #e7c7a4;
	border-radius: 14px;
	padding: 0.65em;
	background: #fffdf7;
	cursor: auto;
	user-select: text;
}

#unsupportedHide {
	position: absolute;
	right: 8px;
	top: 8px;
	width: 2em;
	height: 2em;
	border: 2px solid #8a3528;
	border-radius: 50%;
	background: #fffdf7;
	text-align: center;
	line-height: 1.75em;
	color: #aa2e21;
	text-shadow: none;
}

/* --- Loader Error Div (unchanged) --- */

.view-outer.loader-error-div,
.loader-error-div .diag-txt {
	display: none
}

.loader-error-div {
	font-family: sans-serif;
}

.loader-error-div .debug-link {
	color: #00f;
	text-decoration: underline;
	cursor: pointer;
	float: right;
}

.loader-error-div .diag-txt textarea,
.loader-error-div .diag-txt iframe {
	height: 10em;
}

.loader-error-div.boot-error-visible {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 40px);
	box-sizing: border-box;
	background: linear-gradient(#9d4a222e, #74351e55),
		url("../../assets/img/asia-splash/background.webp") center / cover no-repeat, #ffc94a;
	z-index: 20;
	touch-action: pan-y;
}

.loader-error-div.boot-error-visible .boot-error-panel {
	width: min(720px, 100%);
	max-height: 94vh;
	overflow: auto;
	box-sizing: border-box;
	border-radius: 28px;
	padding: clamp(18px, 4vw, 32px);
	background: #fff9e9;
	border: 3px solid #fff0b4;
	box-shadow: 0 8px 0 #85472740, 0 24px 60px #68331833;
	color: #694328;
	font-family: "Trebuchet MS", "Microsoft YaHei", Meiryo, system-ui, sans-serif;
	font-size: 16px;
	touch-action: pan-y;
}

.boot-error-emblem {
	width: 76px; height: 76px; margin-bottom: 14px;
	background: url("../../assets/img/asia-splash/icon.webp") center / contain no-repeat;
}
.boot-error-message { margin: 12px 0 22px; line-height: 1.65; color: #76533b; }
.boot-error-details { border-top: 1px solid #e7c7a4; padding-top: 8px; }
.boot-error-details summary { min-height: 44px; line-height: 44px; cursor: pointer; color: #76533b; }
.boot-error-details summary:focus-visible { outline: 3px solid #08737a; outline-offset: 2px; }

.boot-error-title {
	font-size: clamp(1.7rem, 5vw, 2.6rem);
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 0.5rem;
}

.boot-error-code {
	display: inline-block;
	margin-bottom: 1rem;
	padding: 0.35rem 0.55rem;
	border-radius: 12px;
	background: #2d3748;
	color: #fff;
	font: 700 0.84rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.boot-error-grid {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 0.55rem 0.9rem;
	align-items: start;
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

.boot-error-grid span {
	color: #526070;
}

.boot-error-grid strong,
.boot-error-resources code,
.boot-error-resources span {
	word-break: break-word;
}

.boot-error-resources {
	margin: 0 0 1rem 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.45rem;
	font-size: 0.9rem;
}

.boot-error-resources li {
	display: grid;
	gap: 0.2rem;
	padding: 0.55rem 0.65rem;
	border-radius: 14px;
	background: #f1f5f9;
}

.boot-error-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.boot-error-actions button {
	min-height: 42px;
	border: 2px solid #8a3528;
	border-radius: 14px;
	padding: 0.65rem 0.85rem;
	background: #e63b46;
	color: #fff;
	font: 800 0.95rem/1 var(--ui-font, TnT, Meiryo, sans-serif);
	cursor: pointer;
}

.boot-error-actions button:nth-child(2) {
	background: #147c8a;
}

.boot-error-actions button:nth-child(3) {
	background: #2d3748;
}

.boot-error-diag {
	width: 100%;
	min-height: 9rem;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
	padding: 0.65rem;
	background: #f8fafc;
	color: #172033;
	font: 0.78rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
	resize: vertical;
}

@media (max-width: 540px) {
	.boot-error-grid {
		grid-template-columns: 1fr;
	}

	.boot-error-actions button {
		width: 100%;
	}
}
