/* DEJOIY app mode: only inside the Android app (html.djx-appmode). The website never shows any of this. */
.djxa, .djxa-dock { display: none; }

/* The website's own top bars and bottom bars give way to the app header and dock. */
html.djx-appmode .djx-header,
html.djx-appmode .djx-strip,
html.djx-appmode .djx-botnav,
html.djx-appmode .djw-strip,
html.djx-appmode .djw-head,
html.djx-appmode .dsu-dock,
html.djx-appmode .et-mobile-panel-wrapper,
html.djx-appmode .djx-skip:not(:focus),
html.djx-appmode .dja { display: none !important; }
html.djx-appmode .joi { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }

html.djx-appmode .djxa, html.djx-appmode .djxa *, html.djx-appmode .djxa-dock, html.djx-appmode .djxa-dock * { box-sizing: border-box; }
html.djx-appmode ::selection { background: #D4FF3A; color: #121212; }

html.djx-appmode .djxa {
	--ink: #121212; --paper: #F3F2EE; --lime: #D4FF3A;
	display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 9990;
	padding: calc(10px + env(safe-area-inset-top)) 0 0;
	background: var(--w, #FF5FA2); color: var(--ink);
	font-size: 14px; line-height: 1.3;
	transition: background-color .45s cubic-bezier(.16, 1, .3, 1), transform .35s cubic-bezier(.16, 1, .3, 1);
	box-shadow: 0 6px 18px -12px rgba(18, 18, 18, .45);
}
html.djx-appmode .djxa a { color: inherit; text-decoration: none; }
html.djx-appmode .djxa svg { display: block; flex: none; }

/* Worlds: the header slides up by the worlds row while scrolling down and returns on the way up.
   It is fixed, not sticky, so folding never moves the page under the reader's thumb. */
.djxa.is-folded { transform: translateY(calc(-1 * var(--fold, 0px))); }
.djxa-worlds { display: flex; gap: 8px; padding: 0 12px 4px; overflow-x: auto !important; scrollbar-width: none; scroll-snap-type: x proximity; }
.djxa-worlds::-webkit-scrollbar { display: none; }
.djxa-world {
	flex: none; display: grid; justify-items: center; gap: 4px; min-width: 76px; padding: 9px 10px 8px;
	border-radius: 14px; background: var(--paper); scroll-snap-align: start;
	font-size: 12px; font-weight: 700; letter-spacing: -.01em;
	box-shadow: 0 2px 6px -3px rgba(18, 18, 18, .35);
	transition: transform .2s cubic-bezier(.16, 1, .3, 1), background-color .2s ease;
}
.djxa-world svg { color: var(--ink); }
.djxa-world.is-on { background: var(--ink); color: var(--c) !important; }
.djxa-world.is-on svg { color: var(--c); }
.djxa-world:active { transform: scale(.94); }

/* Delivery line */
.djxa-deliver { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.djxa-loc {
	display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 32px; margin: 0; padding: 0;
	border: 0; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.djxa-loc-t { font-weight: 600; }
.djxa-loc strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 800; }
.djxa-loc[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.djxa-eta { margin-left: auto; flex: none; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: var(--w, #D4FF3A); font-size: 12px; font-weight: 800; }
.djxa-pin { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 12px 10px; }
.djxa-pin[hidden] { display: none; }
.djxa-pin input {
	flex: 1; min-width: 0; height: 42px; margin: 0; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 12px;
	background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; letter-spacing: .08em;
}
.djxa-pin button { height: 42px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--ink); color: var(--lime); font: inherit; font-weight: 800; cursor: pointer; }
.djxa-pin-err { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 700; }

/* Search */
.djxa-search {
	display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 0 6px 0 14px; height: 48px;
	border-radius: 14px; background: #fff; color: var(--ink);
	box-shadow: 0 3px 10px -6px rgba(18, 18, 18, .5);
}
.djxa-search > svg { opacity: .7; }
.djxa-search input[type="search"] {
	flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0 !important; background: none !important;
	box-shadow: none !important; color: var(--ink); font: inherit; font-size: 16px; outline: none;
}
.djxa-search input::placeholder { color: rgba(18, 18, 18, .6); }
.djxa-search input::-webkit-search-cancel-button { display: none; }
.djxa-search:focus-within { box-shadow: 0 0 0 2.5px var(--ink); }
.djxa-mic { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.djxa-mic[hidden] { display: none; }
.djxa-mic.is-on { background: var(--ink); color: var(--lime); animation: djxa-listen 1.1s ease-in-out infinite; }
@keyframes djxa-listen { 50% { box-shadow: 0 0 0 6px rgba(18, 18, 18, .18); } }

/* Categories */
.djxa-cats { display: flex; gap: 18px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; background: rgba(18, 18, 18, .06); }
.djxa-cats::-webkit-scrollbar { display: none; }
.djxa-cats a { flex: none; position: relative; padding: 11px 0 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.djxa-cats a.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); }

/* Floating bottom bar */
html.djx-appmode .djxa-dock {
	display: flex; align-items: center; gap: 10px; position: fixed; left: 10px; right: 10px; z-index: 9991;
	bottom: calc(10px + env(safe-area-inset-bottom));
}
.djxa-tabs {
	flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 64px; padding: 6px; border-radius: 22px;
	background: rgba(255, 255, 255, .96); box-shadow: 0 10px 28px -10px rgba(18, 18, 18, .45), 0 0 0 1px rgba(18, 18, 18, .06);
}
.djxa-tab { display: grid; justify-items: center; align-content: center; gap: 2px; color: #121212 !important; text-decoration: none !important; }
.djxa-tab-ic { position: relative; display: grid; place-items: center; width: 48px; height: 30px; border-radius: 999px; transition: background-color .25s cubic-bezier(.16, 1, .3, 1); }
.djxa-tab-l { font-size: 11px; font-weight: 700; }
.djxa-tab.is-on .djxa-tab-ic { background: #D4FF3A; }
.djxa-tab:active .djxa-tab-ic { transform: scale(.92); }
.djxa-badge {
	position: absolute; top: -3px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: #FF5FA2; color: #121212; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.djxa-badge[hidden] { display: none; }
.djxa-joi {
	flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
	background: #121212; color: #D4FF3A !important; box-shadow: 0 10px 28px -10px rgba(18, 18, 18, .7);
	transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}
.djxa-joi:active { transform: scale(.92); }

html.djx-appmode .djxa a:focus-visible, html.djx-appmode .djxa button:focus-visible,
html.djx-appmode .djxa-dock a:focus-visible { outline: 3px solid #121212; outline-offset: 2px; }
html.djx-appmode .djxa-dock a:focus-visible { outline-color: #FF5FA2; }

@media (prefers-reduced-motion: reduce) {
	html.djx-appmode .djxa, .djxa-world, .djxa-tab-ic, .djxa-joi { transition: none; }
	.djxa-mic.is-on { animation: none; }
}
