/* Jelajah 3D (/jelajah/): dunia 3D layar penuh dengan tombol kaca melayang. */
:root {
	--jx-accent: #7d2e46;
	--jx-on-accent: #fff;
	--jx-ink: #1b1f2a;
	--jx-paper: #fffaf0;
	--jx-open: #16a34a;
	--jx-safe-t: env(safe-area-inset-top, 0px);
	--jx-safe-b: env(safe-area-inset-bottom, 0px);
	--jx-glass: rgba(255, 255, 255, .88);
	--jx-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 10px 28px rgba(16, 24, 40, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body.jx {
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #9edcff; color: var(--jx-ink); -webkit-font-smoothing: antialiased;
	overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none;
}
.jx a { color: inherit; }
.jx button { font: inherit; color: inherit; cursor: pointer; }
.jx svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.jx :focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }

.jx-stage { position: fixed; inset: 0; }
.jx-stage canvas { width: 100% !important; height: 100% !important; display: block; }

/* Panel kaca: sudut membulat dan bayangan lembut. */
.jx-top > *, .jx-compass, .jx-card, .jx-list, .jx-round, .jx-loading-box, .jx-label {
	background: var(--jx-glass); border: 1px solid rgba(255, 255, 255, .7); border-radius: 16px; box-shadow: var(--jx-shadow);
	backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
}

.jx-top { position: fixed; z-index: 10; top: calc(10px + var(--jx-safe-t)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: stretch; pointer-events: none; }
.jx-top > * { pointer-events: auto; }
.jx-back, .jx-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-weight: 800; font-size: 14px; text-decoration: none; }
.jx-title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.jx-title strong { font-weight: 800; font-size: 16px; color: var(--jx-accent); }
.jx-title span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.jx-btn { background: var(--jx-accent) !important; color: var(--jx-on-accent) !important; }

.jx-compass {
	position: fixed; z-index: 9; top: calc(68px + var(--jx-safe-t)); left: 50%; transform: translateX(-50%);
	display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; max-width: calc(100% - 20px); text-align: left;
}
.jx-compass i { font-style: normal; font-size: 18px; color: var(--jx-accent); display: inline-block; transition: transform .1s linear; }
.jx-compass span { display: flex; flex-direction: column; min-width: 0; }
.jx-compass b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jx-compass small { font-size: 11.5px; color: #4b5563; }

.jx-labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.jx-label {
	position: absolute; left: 0; top: 0; padding: 4px 8px; font-size: 12px; font-weight: 800; white-space: nowrap;
	max-width: 180px; overflow: hidden; text-overflow: ellipsis; border-radius: 999px; backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff;
}
.jx-label::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #9ca3af; vertical-align: 1px; }
.jx-label.is-open::before { background: var(--jx-open); }

.jx-card {
	position: fixed; z-index: 11; left: 50%; bottom: calc(18px + var(--jx-safe-b)); transform: translateX(-50%);
	width: min(440px, calc(100% - 20px)); display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; padding: 12px;
	animation: jx-pop .22s ease-out both;
}
@keyframes jx-pop { from { transform: translateX(-50%) translateY(16px); opacity: 0; } }
.jx-card-emoji { width: 52px; height: 52px; display: grid; place-items: center; font-size: 30px; background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .08); }
.jx-card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jx-card-body strong { font-size: 16px; line-height: 1.25; }
.jx-card-body small { color: #4b5563; font-size: 12.5px; }
.jx-status { font-style: normal; font-weight: 800; font-size: 12.5px; color: #6b7280; }
.jx-status.is-open { color: var(--jx-open); }
.jx-card-menu { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.jx-card-menu li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(16, 24, 40, .08); padding-top: 4px; }
.jx-card-menu span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-enter {
	grid-column: 1 / -1; display: block; text-align: center; padding: 13px; font-weight: 800; font-size: 15px; border-radius: 14px;
	background: var(--jx-accent); color: var(--jx-on-accent) !important; text-decoration: none; transition: transform .1s;
}
.jx-enter:active { transform: scale(.98); }

.jx-list {
	position: fixed; z-index: 12; top: calc(66px + var(--jx-safe-t)); right: 10px; width: min(360px, calc(100% - 20px));
	max-height: calc(100% - 96px - var(--jx-safe-t) - var(--jx-safe-b)); display: flex; flex-direction: column; overflow: hidden;
}
.jx-list[hidden] { display: none; }
.jx-list-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(16, 24, 40, .1); }
.jx-list-head strong { font-weight: 800; font-size: 15px; }
.jx-list-head button { border: 0; background: none; padding: 4px; display: grid; }
.jx-list-items { overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.jx-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(16, 24, 40, .06); background: none; text-align: left; }
.jx-item:hover { background: rgba(16, 24, 40, .05); }
.jx-item > span:first-child { font-size: 22px; width: 32px; text-align: center; }
.jx-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.jx-item strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jx-item small { font-size: 12px; color: #6b7280; }
.jx-item small.is-open { color: var(--jx-open); }
.jx-empty { margin: 0; padding: 14px 12px; font-size: 14px; }

.jx-pad {
	position: fixed; z-index: 8; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .28); display: none; pointer-events: none;
}
.jx-pad.is-on { display: grid; place-items: center; }
.jx-pad i { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--jx-shadow); }

.jx-actions { position: fixed; z-index: 9; right: 12px; bottom: calc(18px + var(--jx-safe-b)); display: flex; flex-direction: column; gap: 10px; }
.jx-round { width: 50px; height: 50px; display: grid; place-items: center; font-size: 22px; padding: 0; }
.jx-round[aria-pressed="true"] { background: var(--jx-accent); }
body:has(.jx-card:not([hidden])) .jx-actions { bottom: calc(260px + var(--jx-safe-b)); }

.jx-hint {
	position: fixed; z-index: 4; left: 12px; bottom: calc(12px + var(--jx-safe-b)); margin: 0; padding: 6px 10px;
	font-size: 12px; font-weight: 700; color: #fff; background: rgba(27, 31, 42, .6); border-radius: 999px; max-width: calc(100% - 90px);
}
body:has(.jx-card:not([hidden])) .jx-hint { display: none; }
.jx-attrib { position: fixed; z-index: 4; right: 0; top: calc(100% - 18px - var(--jx-safe-b)); margin: 0; padding: 1px 6px; font-size: 10px; background: rgba(255, 255, 255, .75); }

.jx-loading, .jx-fallback { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #9edcff; }
.jx-loading[hidden], .jx-fallback[hidden] { display: none; }
.jx-loading-box { display: grid; gap: 14px; justify-items: center; padding: 22px 26px; text-align: center; max-width: calc(100% - 32px); }
.jx-logo-k {
	width: 56px; height: 56px; display: grid; place-items: center; background: var(--jx-accent); color: #fff;
	font-weight: 800; font-size: 26px; border-radius: 16px; animation: jx-bob .6s ease-in-out infinite alternate;
}
@keyframes jx-bob { to { transform: translateY(-8px); } }

@media (min-width: 900px) {
	.jx-top { left: 16px; right: 16px; top: 16px; }
	.jx-title { flex: 0 1 auto; }
	.jx-top .jx-btn { margin-left: auto; }
	.jx-card { left: auto; right: 84px; transform: none; bottom: 20px; }
	@keyframes jx-pop { from { transform: translateY(16px); opacity: 0; } }
	body:has(.jx-card:not([hidden])) .jx-actions { bottom: calc(18px + var(--jx-safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
	.jx-card, .jx-logo-k { animation: none; }
}
