/* Scoped to the game shell; the public portal keeps its own layout. */
.realm-map-mode { --map-gold:#ddc58a; display:flex!important; flex-direction:column; height:100dvh; min-height:600px; overflow:hidden; background:#142c28; }
.realm-map-mode .app-header { flex:0 0 auto; z-index:12; background:#101f20f5; border-bottom:1px solid #b9a16a66; }
.realm-map-mode .app-main { position:relative; flex:1; min-height:0; width:100%; max-width:none; padding:0; overflow:hidden; isolation:isolate; }
.realm-map-mode .realm-banner { display:none; }
.realm-map-mode .app-nav { position:relative; top:auto; order:3; flex:0 0 auto; align-self:stretch; display:flex; flex-direction:row; width:100%; height:86px; padding:8px 14px; gap:5px; overflow-x:auto; overflow-y:hidden; background:#101f20; border-top:1px solid #b9a16a66; border-right:0; z-index:15; }
.realm-map-mode .app-nav .nav-item { flex:1 0 72px; display:flex; flex-direction:column; justify-content:center; gap:5px; min-height:60px; margin:0; padding:5px; border:1px solid #96ad8b20; border-radius:5px; text-align:center; }
.realm-map-mode .app-nav .nav-icon { width:auto; font-size:21px; }
.realm-map-mode .app-nav .nav-label { font-size:10px; }
.realm-map-mode .app-nav .nav-item.active { background:#c4a45820; color:#f5df9e; border-color:#c4a45877; }
.realm-map-mode .app-nav .nav-item::after { display:none; }
.map-home { position:absolute; z-index:16; right:24px; top:100px; padding:11px 17px; border:1px solid #cbb57c88; border-radius:4px; background:#142c2df2; color:#efdcaa; cursor:pointer; }
.realm-map { position:absolute; inset:0; overflow:hidden; background:#244b40; }
.realm-terrain { position:absolute; width:100%; height:100%; object-fit:fill; image-rendering:pixelated; opacity:.95; }
.realm-map::after { content:''; position:absolute; inset:0; pointer-events:none; box-shadow:inset 0 0 120px #06191b99; background:linear-gradient(#071b2320,transparent 30%,transparent 75%,#071b2355); }
.map-heading { position:absolute; top:25px; left:30px; z-index:2; text-shadow:0 2px 6px #07191c; pointer-events:none; }
.map-heading>span { color:#cfc08c; letter-spacing:.22em; font-size:10px; }
.map-heading h1 { margin:4px 0; font-family:var(--font-title); font-size:28px; color:#fff0c5; }
.map-heading p { font-size:11px; color:#c0d1b8; margin:0; }
.map-compass { position:absolute; right:37px; top:92px; text-align:center; font-size:23px; color:#d7c89499; z-index:2; }
.map-compass small { font-size:8px; letter-spacing:.2em; }
.map-locations { position:absolute; inset:0; z-index:3; }
.map-place { position:absolute; left:var(--x); top:var(--y); transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; width:150px; padding:7px 2px; color:#f4e7bc; background:none; border:0; cursor:pointer; text-shadow:0 2px 3px #061919; transition:filter .15s,translate .15s; }
.map-place:hover,.map-place:focus-visible { filter:brightness(1.25); translate:0 -5px; outline:2px solid #e4d095; outline-offset:4px; border-radius:8px; }
.place-building { position:relative; display:grid; place-items:center; width:74px; height:55px; margin-bottom:9px; background:linear-gradient(90deg,#473b2d 12%,#b5a375 13% 18%,#55432f 19% 81%,#b5a375 82% 87%,#473b2d 88%); border-bottom:7px solid #8d8a70; box-shadow:9px 12px 0 #112d2d55; }
.place-building::before { content:''; position:absolute; top:-21px; left:-14px; width:102px; height:30px; background:repeating-linear-gradient(0deg,#244b4b 0 4px,#426c64 4px 7px); clip-path:polygon(0 80%,20% 50%,30% 0,70% 0,80% 50%,100% 80%,94% 100%,6% 100%); border-bottom:3px solid #b4a374; }
.place-building b { font-family:serif; font-size:27px; color:#e4ca87; }
.map-place strong { font-size:13px; background:#10292bd9; border:1px solid #b9a16a77; padding:4px 12px; border-radius:3px; }
.map-place small { margin-top:4px; color:#d0d7b9; font-size:10px; }
.map-place.violet .place-building { background:#59476c; box-shadow:0 0 30px #b48be366; border-color:#a18cb5; }
.map-place.violet .place-building::before { background:repeating-linear-gradient(#4d4666 0 4px,#746789 4px 7px); }
.map-place.red .place-building { background:#623f35; box-shadow:0 0 30px #e4844666; }
.map-place.red .place-building::before { background:repeating-linear-gradient(#684735 0 4px,#98754d 4px 7px); }
.map-player { position:absolute; left:50%; top:49%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; z-index:4; pointer-events:none; }
.map-player-name { font-size:11px; color:#e8f7cd; padding:3px 8px; background:#102c2bba; margin-bottom:5px; }
.pixel-person { width:36px; height:49px; display:block; background:#accbbb; clip-path:polygon(35% 0,65% 0,70% 21%,60% 26%,77% 33%,100% 76%,75% 69%,85% 100%,15% 100%,25% 69%,0 76%,23% 33%,40% 26%,30% 21%); box-shadow:inset 0 9px #243939,inset 12px 0 #527e78; }
.map-player i { width:45px; height:12px; border:1px solid #aad4a7; border-radius:50%; background:#9debb130; box-shadow:0 0 17px #a6e9b266; }
.map-guide { position:absolute; bottom:42px; left:24px; width:235px; padding:15px; z-index:5; border:1px solid #a2a17066; border-left:3px solid #c4af76; background:#0f262ae6; box-shadow:0 8px 25px #061c2644; }
.map-guide>span { display:block; font-size:9px; letter-spacing:.15em; color:#c3ad73; margin-bottom:7px; }
.map-guide strong { font-family:var(--font-title); color:#eee0b9; font-size:14px; }
.map-guide p { font-size:11px; line-height:1.7; color:#aebfb5; margin:7px 0; }
.map-guide button { width:100%; text-align:left; color:#dcca94; background:#a4aa6c12; border:1px solid #b0ac7055; padding:7px 9px; cursor:pointer; }
.map-guide button b { float:right; }
.map-caption { position:absolute; bottom:0; left:0; right:0; padding:9px 24px; color:#c1cfb9; font-size:10px; z-index:5; background:#0d252bba; }
.map-caption span { float:right; color:#9bb0a6; }
.map-caption i { display:inline-block; width:5px; height:5px; border-radius:50%; background:#a2d3a0; margin-right:6px; }
.realm-panel-toolbar { display:none; }
.realm-map-mode:not(.realm-panel-open) .tab-pane { display:none!important; }
.realm-panel-open .realm-panel-toolbar { position:absolute; display:flex; align-items:center; justify-content:space-between; top:20px; left:6%; width:88%; height:46px; padding:0 12px; z-index:7; background:#172b2b; border:1px solid #b9a16a66; border-radius:7px 7px 0 0; }
.realm-panel-toolbar button { background:none; border:0; color:#dec992; cursor:pointer; padding:8px; }
.realm-panel-title { font-size:12px; color:#eee0b9; }
.realm-map-mode.realm-panel-open .tab-pane.active { position:absolute; inset:66px 6% 20px; z-index:6; min-height:0; overflow:auto; padding:20px; background:#101f23f7; border:1px solid #b9a16a66; border-top:0; border-radius:0 0 7px 7px; overscroll-behavior:contain; }
.realm-panel-open .activity-hub { display:none; }
@media(max-width:760px) {
  .realm-map-mode { min-height:540px; }
  .realm-map-mode .app-header { padding:7px 10px; gap:6px; }
  .realm-map-mode .brand-title { font-size:11px; }
  .realm-map-mode .header-center { padding:3px 8px; }
  .realm-map-mode .app-nav { height:74px; padding:5px; }
  .realm-map-mode .app-nav .nav-item { flex-basis:65px; min-height:54px; }
  .map-heading { top:12px; left:13px; }.map-heading h1 { font-size:19px; }.map-heading p { font-size:9px; }
  .map-home { top:12px; right:12px; position:fixed; padding:7px 10px; }
  .map-compass { display:none; }
  .map-place { width:100px; }.map-place strong { font-size:10px; padding:3px 5px; }.map-place small { display:none; }
  .place-building { transform:scale(.65); margin-bottom:-3px; }
  .map-guide { left:10px; bottom:35px; padding:9px; width:154px; }.map-guide p { display:none; }.map-guide strong { font-size:11px; }.map-guide button { margin-top:7px; font-size:10px; }
  .map-caption { padding-inline:10px; font-size:9px; }.map-caption span { display:none; }
  .realm-panel-open .realm-panel-toolbar { top:8px; left:2%; width:96%; }
  .realm-map-mode.realm-panel-open .tab-pane.active { inset:54px 2% 8px; padding:10px; }
}
@media(prefers-reduced-motion:reduce) { .map-place { transition:none; } }
.realm-panel-open .map-home { display:none; }
@media(max-width:760px) { .map-guide { display:none; } }
/* Refined MMORPG HUD, recreated for the Tu Tien client. */
.realm-map-mode { position:relative; background:#111b1a; }
.realm-map-mode .app-header { position:absolute; inset:18px 20px auto; display:flex; justify-content:space-between; align-items:flex-start; padding:0; min-height:0; background:none; border:0; box-shadow:none; backdrop-filter:none; pointer-events:none; }
.realm-map-mode .app-header>* { pointer-events:auto; }
.realm-map-mode .brand { display:none; }
.realm-map-mode .header-center { order:0; justify-self:start; width:325px; gap:12px; padding:10px 16px 12px 10px; border-radius:5px; background:linear-gradient(115deg,#121b21f5,#1a282af2); border:1px solid #b3975b; box-shadow:inset 0 0 0 3px #090f16,0 6px 22px #0006; }
.realm-map-mode .avatar-box { width:64px; height:64px; flex-shrink:0; background:#25383c url('/assets/characters/cultivator-map-v2.png') center 18%/170% auto no-repeat; border:2px solid #c3a363; box-shadow:0 0 0 3px #1f2928,0 0 0 4px #806a40; }
.realm-map-mode .avatar-box img { opacity:0; }
.realm-map-mode .realm-ring { display:none; }
.realm-map-mode .player-name { font-family:var(--font-title); font-size:14px; color:#f2dfaf; }
.realm-map-mode .class-tag { font-size:9px; padding:2px 4px; }
.realm-map-mode .realm-badge { font-size:9px; background:none; padding:0; color:#92b7ac; }
.realm-map-mode .exp-bar-container { height:12px; margin-top:6px; border:1px solid #596b6e; border-radius:0; background:#071218; }
.realm-map-mode .exp-bar-fill { background:repeating-linear-gradient(90deg,#638fa1 0 9px,#568393 9px 10px); box-shadow:0 0 8px #76b7bf55; }
.realm-map-mode .exp-text { font-size:8px; }
.realm-vitals { display:flex; justify-content:space-between; gap:10px; margin-top:6px; font-size:8px; color:#9aaea8; }
.realm-vitals b { color:#c7d7b7; margin-left:3px; font-weight:500; }
.realm-map-mode .header-right { margin-right:214px; gap:5px; }
.realm-map-mode .currency-badge { padding:5px 8px; min-height:30px; background:#101c20e8; border:1px solid #8f7e534f; border-radius:3px; }
.realm-map-mode .curr-label { display:none; }.realm-map-mode .curr-val { font-size:11px; }
.realm-map-mode .btn-icon { width:29px; height:29px; border-radius:3px; background:#101c20e8; font-size:12px; }
.realm-map-mode .app-nav { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); width:min(1140px,calc(100% - 32px)); height:81px; padding:9px; gap:6px; border:1px solid #ab8d51; border-radius:5px; background:linear-gradient(#25302af5,#101b1df5); box-shadow:inset 0 0 0 3px #0b1115,0 8px 24px #0009; }
.realm-map-mode .app-nav::before { display:none; }
.realm-map-mode .app-nav .nav-item { flex:1 0 58px; border:0; min-height:55px; background:none; border-radius:3px; padding:2px; gap:3px; color:#bdc2ab; }
.realm-map-mode .app-nav .nav-icon { display:grid; place-items:center; width:34px; height:34px; border:1px solid #7f7d5f; border-radius:50%; color:#d1b774; background:radial-gradient(circle at 40% 25%,#334743,#121f24 75%); box-shadow:0 2px 4px #0008,inset 0 0 0 2px #14232a; }
.realm-map-mode .nav-icon svg { width:22px; height:22px; }
.realm-map-mode .app-nav .nav-item.active { background:none; color:#f0d59c; border:0; }
.realm-map-mode .app-nav .nav-item.active .nav-icon { border-color:#e5c26f; color:#f1d490; box-shadow:0 0 12px #d3b36533,inset 0 0 0 2px #334d43; }
.realm-map-mode .app-nav .nav-label { font-size:9px; }
.realm-map-mode .app-nav .nav-item:hover .nav-icon { color:#fff0ba; border-color:#e5c26f; transform:translateY(-2px); }
.realm-map-mode .app-main { flex:1; }
.realm-painted-world { position:absolute; inset:0; background:url('/assets/characters/realm-world-v2.png') center/100% 100% no-repeat; }
.realm-map::after { box-shadow:inset 0 0 140px #0a182c66; background:linear-gradient(#0a152833,transparent 25%,transparent 70%,#0b152466); }
.map-heading { left:50%; top:20px; transform:translateX(-50%); text-align:center; }
.map-heading>span { font-size:9px; letter-spacing:.27em; color:#ecd9aa; }
.map-heading h1 { font-size:24px; color:#fff2ca; }.map-heading p { font-size:10px; color:#d7dfc9; }
.realm-minimap { position:absolute; right:20px; top:18px; width:180px; z-index:5; border:1px solid #b3975b; background:#112026ed; padding:7px; border-radius:4px; box-shadow:inset 0 0 0 2px #070e16,0 5px 20px #0005; }
.minimap-title { font-size:10px; color:#e5d3a4; margin:2px 0 7px; }.minimap-title small { float:right; font-size:7px; color:#a9bfb3; margin-top:3px; }
.minimap-image { height:106px; background:url('/assets/characters/realm-world-v2.png') center/cover; position:relative; border:1px solid #60715d; }
.minimap-image i { position:absolute; left:50%; top:50%; width:5px; height:5px; background:#f3e8a4; border-radius:50%; box-shadow:0 0 0 3px #ddebc44d; }
.realm-minimap p { font-size:8px; color:#afc1ae; margin:7px 0 1px; }.realm-minimap p span { float:right; color:#e5c26f; }
.map-home { top:204px; right:20px; padding:7px 12px; font-size:10px; background:#102026e8; border-color:#a08b55; }
.place-building { width:31px; height:31px; border-radius:50%; margin-bottom:5px; background:#172d2bdb!important; border:1px solid #d0b77b!important; box-shadow:0 2px 9px #081a1b99!important; }
.place-building::before { display:none; }.place-building b { font-size:18px; color:#e4d4a2; }
.map-place strong { background:linear-gradient(#14272be8,#0c1c23f2); border-color:#bba36b99; font-size:11px; border-radius:3px; padding:4px 12px; }
.map-place small { font-size:9px; color:#e2e6cf; text-shadow:0 2px 3px #07151b; }
.map-place.violet .place-building { color:#dec8fa; border-color:#bb9ee1!important; }
.map-place.red .place-building { border-color:#d9966c!important; }
.map-player { top:50%; }.cultivator-sprite { width:100px; height:132px; object-fit:contain; filter:drop-shadow(2px 5px 2px #101b2666); animation:cultivatorIdle 3s ease-in-out infinite; }
.map-player-name { background:none; color:#fff2bd; font-size:12px; text-shadow:0 2px 2px #071320,1px 0 #071320,-1px 0 #071320; margin-bottom:0; }
.player-realm-tag { position:absolute; top:-15px; font-size:8px; white-space:nowrap; color:#c7e7d1; text-shadow:0 1px 2px #071320; }
.map-player i { width:65px; height:15px; margin-top:-11px; border-color:#b9ecd388; box-shadow:0 0 14px #a3f6d455; }
.map-guide { bottom:116px; left:20px; width:230px; padding:13px 15px; border:1px solid #aa925b88; border-radius:4px; background:linear-gradient(120deg,#122229ed,#17282be6); box-shadow:inset 0 0 0 2px #0b1820,0 5px 20px #0004; }
.map-guide strong { font-size:13px; }.map-guide p { font-size:10px; line-height:1.8; }.map-guide button { font-size:10px; }
.map-caption { padding:6px 20px; background:#0c1820aa; font-size:9px; }
.realm-panel-open .realm-panel-toolbar { top:118px; left:15%; width:70%; background:linear-gradient(#2c3737,#17252b); border-color:#ae925f; }
.realm-map-mode.realm-panel-open .tab-pane.active { inset:164px 15% 110px; background:#142129fa; border-color:#ae925f; box-shadow:0 12px 60px #0008; }
.realm-map-mode.realm-panel-open .map-locations { pointer-events:none; }
.realm-fireflies { position:absolute; inset:0; pointer-events:none; z-index:2; }.realm-fireflies i { position:absolute; width:3px; height:3px; background:#e1f2c1; border-radius:50%; box-shadow:0 0 12px 3px #cdf3b977; animation:spiritDrift 7s ease-in-out infinite; left:43%; top:57%; }.realm-fireflies i:nth-child(2){left:57%;top:43%;animation-delay:-2s}.realm-fireflies i:nth-child(3){left:33%;top:36%;animation-delay:-4s}.realm-fireflies i:nth-child(4){left:67%;top:71%;animation-delay:-6s}
@keyframes cultivatorIdle { 50%{transform:translateY(-3px)} }@keyframes spiritDrift { 50%{transform:translate(10px,-18px);opacity:.2} }
@media(max-width:1000px) and (min-width:761px) { .realm-map-mode .header-right { margin-right:0; margin-top:98px; }.realm-minimap { width:145px; }.map-heading { top:24px; left:58%; }.realm-map-mode .header-center { width:290px; }.map-home { top:190px; } }
@media(max-width:760px) {
 .realm-map-mode { min-height:540px; }.realm-map-mode .app-header { inset:10px 10px auto; display:flex; flex-wrap:wrap; gap:5px; }
 .realm-map-mode .header-center { flex:0 1 245px; width:245px; padding:7px; order:0; gap:8px; }.realm-map-mode .avatar-box { width:44px; height:44px; }.realm-map-mode .player-name { font-size:11px; }.realm-map-mode .player-name-row { gap:3px; }.realm-map-mode .player-info { flex:1; }
 .realm-map-mode .header-right { flex:0 1 auto; margin:0; gap:3px; justify-content:flex-start; }.realm-map-mode .header-controls { gap:3px; }.realm-map-mode .currency-badge { padding:3px 6px; min-height:25px; }.realm-map-mode .curr-val { font-size:9px; }.realm-map-mode .btn-icon { width:25px; height:25px; }
 .realm-vitals { font-size:7px; gap:5px; }.realm-map-mode .realm-badge { font-size:8px; }.realm-map-mode .class-tag { display:none; }.realm-map-mode .exp-text { font-size:7px; }
 .map-heading { top:122px; left:14px; transform:none; text-align:left; }.map-heading h1 { font-size:18px; }.map-heading>span { font-size:7px; }.map-heading p { display:none; }
 .realm-minimap { top:12px; right:10px; width:100px; padding:4px; }.minimap-title { font-size:8px; margin:0 0 4px; }.minimap-title small,.realm-minimap p { display:none; }.minimap-image { height:60px; }
 .map-home { position:absolute; top:100px; right:10px; font-size:9px; padding:5px 8px; }
 .realm-map-mode .app-nav { bottom:10px; width:calc(100% - 20px); height:72px; padding:7px; }.realm-map-mode .app-nav .nav-item { flex-basis:57px; min-height:50px; }.realm-map-mode .app-nav .nav-icon { width:31px; height:31px; }.realm-map-mode .app-nav .nav-label { font-size:8px; }
 .map-place { width:94px; }.place-building { transform:none; width:24px; height:24px; margin-bottom:3px; }.place-building b { font-size:14px; }.map-place strong { font-size:9px; padding:3px 5px; }.cultivator-sprite { width:76px; height:103px; }.map-player-name { font-size:10px; }.player-realm-tag { font-size:7px; }
 .realm-panel-open .realm-panel-toolbar { top:115px; left:2%; width:96%; }.realm-map-mode.realm-panel-open .tab-pane.active { inset:161px 2% 90px; padding:10px; }
 .realm-map::after { box-shadow:inset 0 0 60px #0a182c66; }.map-guide { display:none; }
}
@media(prefers-reduced-motion:reduce) { .cultivator-sprite,.realm-fireflies i { animation:none; } }
.realm-map-mode .header-center { margin:0; }
.realm-map-mode .player-info { min-width:0; width:auto; flex:1; }
.realm-map-mode .exp-bar-container { width:100%; min-width:0; max-width:100%; }
@media(max-width:760px) { .realm-painted-world { background-size:cover; }.realm-map-mode .player-name-row { flex-wrap:wrap; }.realm-map-mode .header-right { max-width:100%; }.realm-map-mode .header-center { max-width:calc(100% - 115px); } }
.realm-map-mode .header-left { display:none; }
